Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Gray code</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Gray_code"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/mediawiki.page.gallery.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Gray_code rootpage-Gray_code skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Gray code</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p class="mw-empty-elt">
</p>
<table class="wikitable floatright" style="text-align:center;">
<tbody><tr>
<th rowspan="2"></th>
<th colspan="4">
</th></tr>
<tr>
<th>4</th>
<th>3</th>
<th>2</th>
<th>1
</th></tr>
<tr>
<td>0</td>
<td style="background:#DDD"><style data-mw-deduplicate="TemplateStyles:r886049734">
/* start https://en.wikipedia.org/ */


.mw-parser-output .monospaced{font-family:monospace,monospace}


/* end https://en.wikipedia.org/ */
</style><span class="monospaced">0</span></td>
<td style="background:#BBB"><span class="monospaced">0</span></td>
<td style="background:#999"><span class="monospaced">0</span></td>
<td style="background:#777"><span class="monospaced">0</span>
</td></tr>
<tr>
<td>1</td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#BBB"><span class="monospaced">0</span></td>
<td style="background:#999"><span class="monospaced">0</span></td>
<td style="background:#07F"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>2</td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#BBB"><span class="monospaced">0</span></td>
<td style="background:#09F"><span class="monospaced">1</span></td>
<td style="background:#09F"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>3</td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#BBB"><span class="monospaced">0</span></td>
<td style="background:#09F"><span class="monospaced">1</span></td>
<td style="background:#999"><span class="monospaced">0</span>
</td></tr>
<tr>
<td>4</td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0BF"><span class="monospaced">1</span></td>
<td style="background:#0BF"><span class="monospaced">1</span></td>
<td style="background:#BBB"><span class="monospaced">0</span>
</td></tr>
<tr>
<td>5</td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0BF"><span class="monospaced">1</span></td>
<td style="background:#0BF"><span class="monospaced">1</span></td>
<td style="background:#0BF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>6</td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0BF"><span class="monospaced">1</span></td>
<td style="background:#BBB"><span class="monospaced">0</span></td>
<td style="background:#0BF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>7</td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0BF"><span class="monospaced">1</span></td>
<td style="background:#BBB"><span class="monospaced">0</span></td>
<td style="background:#BBB"><span class="monospaced">0</span>
</td></tr>
<tr>
<td>8</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#DDD"><span class="monospaced">0</span>
</td></tr>
<tr>
<td>9</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>10</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>11</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span>
</td></tr>
<tr>
<td>12</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span>
</td></tr>
<tr>
<td>13</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>14</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td>15</td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#DDD"><span class="monospaced">0</span></td>
<td style="background:#DDD"><span class="monospaced">0</span>
</td></tr></tbody></table>
<p>The <b>reflected binary code</b> (<b>RBC</b>), also known as <b>reflected binary</b> (<b>RB</b>) or <b>Gray code</b> after <a href="Frank_Gray_(researcher)" title="Frank Gray (researcher)">Frank Gray</a>, is an ordering of the <a href="Binary_numeral_system" class="mw-redirect" title="Binary numeral system">binary numeral system</a> such that two successive values differ in only one <a href="Bit" title="Bit">bit</a> (binary digit).
</p><p>For example, the representation of the decimal value "1" in binary would normally be "<span class="monospaced">001</span>", and "2" would be "<span class="monospaced">010</span>". In Gray code, these values are represented as "<span class="monospaced">001</span>" and "<span class="monospaced">011</span>". That way, incrementing a value from 1 to 2 requires only one bit to change, instead of two.
</p><p>Gray codes are widely used to prevent spurious output from <a href="Electromechanical" class="mw-redirect" title="Electromechanical">electromechanical</a> <a href="Switch" title="Switch">switches</a> and to facilitate <a href="Error_correction" class="mw-redirect" title="Error correction">error correction</a> in digital communications such as <a href="Digital_terrestrial_television" title="Digital terrestrial television">digital terrestrial television</a> and some <a href="DOCSIS" title="DOCSIS">cable TV</a> systems. The use of Gray code in these devices helps simplify logic operations and reduce errors in practice.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Function">Function</h2></div>
<p>Many devices indicate position by closing and opening switches. If that device uses <a href="Natural_binary_code" class="mw-redirect" title="Natural binary code">natural binary codes</a>, positions 3 and 4 are next to each other but all three bits of the binary representation differ:
</p>
<table class="wikitable" style="text-align:center;">

<tbody><tr>
<th>Decimal</th>
<th>Binary
</th></tr>
<tr>
<td>...</td>
<td>...
</td></tr>
<tr>
<td>3</td>
<td><span class="monospaced">011</span>
</td></tr>
<tr>
<td>4</td>
<td><span class="monospaced">100</span>
</td></tr>
<tr>
<td>...</td>
<td>...
</td></tr></tbody></table>
<p>The problem with natural binary codes is that physical switches are not ideal: it is very unlikely that physical switches will change states exactly in synchrony. In the transition between the two states shown above, all three switches change state. In the brief period while all are changing, the switches will read some spurious position. Even without <a href="Keybounce" class="mw-redirect" title="Keybounce">keybounce</a>, the transition might look like <span class="monospaced">011</span> — <span class="monospaced">001</span> — <span class="monospaced">101</span> — <span class="monospaced">100</span>. When the switches appear to be in position <span class="monospaced">001</span>, the observer cannot tell if that is the "real" position 1, or a transitional state between two other positions. If the output feeds into a <a href="Sequential_logic" title="Sequential logic">sequential</a> system, possibly via <a href="Combinational_logic" title="Combinational logic">combinational logic</a>, then the sequential system may store a false value.
</p><p>This problem can be solved by changing only one switch at a time, so there is never any ambiguity of position, resulting in codes assigning to each of a contiguous set of <a href="Integer" title="Integer">integers</a>, or to each member of a circular list, a word of symbols such that no two code words are identical and each two adjacent code words differ by exactly one symbol. These codes are also known as <i>unit-distance</i>,<sup id="cite_ref-Tompkins_1956_2-0" class="reference"><a href="#cite_note-Tompkins_1956-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Kautz_1958_3-0" class="reference"><a href="#cite_note-Kautz_1958-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Susskind_1958_4-0" class="reference"><a href="#cite_note-Susskind_1958-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Chinal_1973_5-0" class="reference"><a href="#cite_note-Chinal_1973-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-MIL_1991_6-0" class="reference"><a href="#cite_note-MIL_1991-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> <i>single-distance</i>, <i>single-step</i>, <i>monostrophic</i><sup id="cite_ref-Spaulding_1954_7-0" class="reference"><a href="#cite_note-Spaulding_1954-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Russell_1964_8-0" class="reference"><a href="#cite_note-Russell_1964-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Chinal_1973_5-1" class="reference"><a href="#cite_note-Chinal_1973-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-MIL_1991_6-1" class="reference"><a href="#cite_note-MIL_1991-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> or <i>syncopic codes</i>,<sup id="cite_ref-Spaulding_1954_7-1" class="reference"><a href="#cite_note-Spaulding_1954-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> in reference to the <a href="Hamming_distance" title="Hamming distance">Hamming distance</a> of 1 between adjacent codes.
</p>
<div class="mw-heading mw-heading2"><h2 id="Invention">Invention</h2></div>
<p>In principle, there can be more than one such code for a given word length, but the term Gray code was first applied to a particular <a href="Binary_numeral_system" class="mw-redirect" title="Binary numeral system">binary</a> code for non-negative integers, the <i>binary-reflected Gray code</i>, or <b>BRGC</b>. <a href="Bell_Labs" title="Bell Labs">Bell Labs</a> researcher
<a href="George_R._Stibitz" class="mw-redirect" title="George R. Stibitz">George R.&nbsp;Stibitz</a> described such a code in a 1941 patent application, granted in 1943.<sup id="cite_ref-Stibitz_1941_9-0" class="reference"><a href="#cite_note-Stibitz_1941-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Winder_1959_10-0" class="reference"><a href="#cite_note-Winder_1959-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Knuth_2014_11-0" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> <a href="Frank_Gray_(researcher)" title="Frank Gray (researcher)">Frank Gray</a> introduced the term <i>reflected binary code</i> in his 1947 patent application, remarking that the code had "as yet no recognized name".<sup id="cite_ref-Gray_1947_12-0" class="reference"><a href="#cite_note-Gray_1947-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> He derived the name from the fact that it "may be built up from the conventional binary code by a sort of reflection process".
</p>


<p>In the standard encoding of the Gray code the least significant bit follows a repetitive pattern of 2&nbsp;on, 2&nbsp;off <span class="nowrap">(... <span class="monospaced">11001100</span> ...);</span> the next digit a pattern of 4&nbsp;on, 4&nbsp;off; the <i>i</i>-th least significant bit a pattern of 2<sup><i>i</i></sup>&nbsp;on 2<sup><i>i</i></sup>&nbsp;off. The most significant digit is an exception to this: for an <i>n</i>-bit Gray code, the most significant digit follows the pattern 2<sup><i>n</i>−1</sup>&nbsp;on, 2<sup><i>n</i>−1</sup>&nbsp;off, which is the same (cyclic) sequence of values as for the second-most significant digit, but shifted forwards 2<sup><i>n</i>−2</sup> places. The four-bit version of this is shown below:
</p>
<table class="wikitable sortable" style="text-align:center;">
<tbody><tr>
<th>Decimal</th>
<th>Binary</th>
<th>Gray
</th></tr>
<tr>
<td>0</td>
<td><span class="monospaced">0000</span></td>
<td><span class="monospaced">0000</span>
</td></tr>
<tr>
<td>1</td>
<td><span class="monospaced">0001</span></td>
<td><span class="monospaced">0001</span>
</td></tr>
<tr>
<td>2</td>
<td><span class="monospaced">0010</span></td>
<td><span class="monospaced">0011</span>
</td></tr>
<tr>
<td>3</td>
<td><span class="monospaced">0011</span></td>
<td><span class="monospaced">0010</span>
</td></tr>
<tr>
<td>4</td>
<td><span class="monospaced">0100</span></td>
<td><span class="monospaced">0110</span>
</td></tr>
<tr>
<td>5</td>
<td><span class="monospaced">0101</span></td>
<td><span class="monospaced">0111</span>
</td></tr>
<tr>
<td>6</td>
<td><span class="monospaced">0110</span></td>
<td><span class="monospaced">0101</span>
</td></tr>
<tr>
<td>7</td>
<td><span class="monospaced">0111</span></td>
<td><span class="monospaced">0100</span>
</td></tr>
<tr>
<td>8</td>
<td><span class="monospaced">1000</span></td>
<td><span class="monospaced">1100</span>
</td></tr>
<tr>
<td>9</td>
<td><span class="monospaced">1001</span></td>
<td><span class="monospaced">1101</span>
</td></tr>
<tr>
<td>10</td>
<td><span class="monospaced">1010</span></td>
<td><span class="monospaced">1111</span>
</td></tr>
<tr>
<td>11</td>
<td><span class="monospaced">1011</span></td>
<td><span class="monospaced">1110</span>
</td></tr>
<tr>
<td>12</td>
<td><span class="monospaced">1100</span></td>
<td><span class="monospaced">1010</span>
</td></tr>
<tr>
<td>13</td>
<td><span class="monospaced">1101</span></td>
<td><span class="monospaced">1011</span>
</td></tr>
<tr>
<td>14</td>
<td><span class="monospaced">1110</span></td>
<td><span class="monospaced">1001</span>
</td></tr>
<tr>
<td>15</td>
<td><span class="monospaced">1111</span></td>
<td><span class="monospaced">1000</span>
</td></tr></tbody></table>
<p>For decimal 15 the code rolls over to decimal 0 with only one switch change. This is called the <i>cyclic</i> or <i>adjacency property</i> of the code.<sup id="cite_ref-Goldberg_1989_13-0" class="reference"><a href="#cite_note-Goldberg_1989-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>
</p><p>In modern <a href="Digital_communications" class="mw-redirect" title="Digital communications">digital communications</a>, Gray codes play an important role in <a href="Error_correction" class="mw-redirect" title="Error correction">error correction</a>. For example, in a <a href="Digital_modulation" class="mw-redirect" title="Digital modulation">digital modulation</a> scheme such as <a href="Quadrature_amplitude_modulation" title="Quadrature amplitude modulation">QAM</a> where data is typically transmitted in <a href="Symbol_rate" title="Symbol rate">symbols</a> of 4 bits or more, the signal's <a href="Constellation_diagram" title="Constellation diagram">constellation diagram</a> is arranged so that the bit patterns conveyed by adjacent constellation points differ by only one bit. By combining this with <a href="Forward_error_correction" class="mw-redirect" title="Forward error correction">forward error correction</a> capable of correcting single-bit errors, it is possible for a receiver to correct any transmission errors that cause a constellation point to deviate into the area of an adjacent point. This makes the transmission system less susceptible to <a href="Noise" title="Noise">noise</a>.
</p><p>Despite the fact that Stibitz described this code<sup id="cite_ref-Stibitz_1941_9-1" class="reference"><a href="#cite_note-Stibitz_1941-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Winder_1959_10-1" class="reference"><a href="#cite_note-Winder_1959-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Knuth_2014_11-1" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> before Gray, the reflected binary code was later named after Gray by others who used it. Two different 1953 patent applications use "Gray code" as an alternative name for the "reflected binary code";<sup id="cite_ref-Breckman_1953_14-0" class="reference"><a href="#cite_note-Breckman_1953-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Ragland-Schultheis_1953_15-0" class="reference"><a href="#cite_note-Ragland-Schultheis_1953-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> one of those also lists "minimum error code" and "cyclic permutation code" among the names.<sup id="cite_ref-Ragland-Schultheis_1953_15-1" class="reference"><a href="#cite_note-Ragland-Schultheis_1953-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> A 1954 patent application refers to "the Bell Telephone Gray code".<sup id="cite_ref-Domeshek-Reiner_1954_16-0" class="reference"><a href="#cite_note-Domeshek-Reiner_1954-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> Other names include "cyclic binary code",<sup id="cite_ref-Winder_1959_10-2" class="reference"><a href="#cite_note-Winder_1959-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> "cyclic progression code",<sup id="cite_ref-Petherick_1953_17-0" class="reference"><a href="#cite_note-Petherick_1953-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Winder_1959_10-3" class="reference"><a href="#cite_note-Winder_1959-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> "cyclic permuting binary"<sup id="cite_ref-Evans_1960_18-0" class="reference"><a href="#cite_note-Evans_1960-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> or "cyclic permuted binary" (CPB).<sup id="cite_ref-Evans_1961_19-0" class="reference"><a href="#cite_note-Evans_1961-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Newson_1965_20-0" class="reference"><a href="#cite_note-Newson_1965-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</p><p>The Gray code is sometimes misattributed to 19th century electrical device inventor <a href="Elisha_Gray" title="Elisha Gray">Elisha Gray</a>.<sup id="cite_ref-Knuth_2014_11-2" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Heath_1961_21-0" class="reference"><a href="#cite_note-Heath_1961-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Cattermole_1969_22-0" class="reference"><a href="#cite_note-Cattermole_1969-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Edwards_2004_23-0" class="reference"><a href="#cite_note-Edwards_2004-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="History_and_practical_application">History and practical application</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Mathematical_puzzles">Mathematical puzzles</h3></div>
<p>Reflected binary codes were applied to mathematical puzzles before they became known to engineers.
</p><p>The binary-reflected Gray code represents the underlying scheme of the classical <a href="Chinese_rings_puzzle" class="mw-redirect" title="Chinese rings puzzle">Chinese rings puzzle</a>, a sequential mechanical puzzle mechanism described by the French Louis Gros in 1872.<sup id="cite_ref-Gros_1872_24-0" class="reference"><a href="#cite_note-Gros_1872-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Knuth_2014_11-3" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p><p>It can serve as a solution guide for the <a href="Towers_of_Hanoi" class="mw-redirect" title="Towers of Hanoi">Towers of Hanoi</a> problem, based on a game by the French <a href="%C3%89douard_Lucas" title="Édouard Lucas">Édouard Lucas</a> in 1883.<sup id="cite_ref-Lucas_1883_25-0" class="reference"><a href="#cite_note-Lucas_1883-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Parville_1883_26-0" class="reference"><a href="#cite_note-Parville_1883-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Allardice-Fraser_1883_27-0" class="reference"><a href="#cite_note-Allardice-Fraser_1883-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Lucas_1892_28-0" class="reference"><a href="#cite_note-Lucas_1892-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup> Similarly, the so-called Towers of Bucharest and Towers of Klagenfurt game configurations yield <a href="#n-ary">ternary and pentary</a> Gray codes.<sup id="cite_ref-Herter-Rote_2016_29-0" class="reference"><a href="#cite_note-Herter-Rote_2016-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup>
</p><p><a href="Martin_Gardner" title="Martin Gardner">Martin Gardner</a> wrote a popular account of the Gray code in his August 1972 <a href="List_of_Martin_Gardner_Mathematical_Games_columns" title="List of Martin Gardner Mathematical Games columns">"Mathematical Games" column</a> in <i><a href="Scientific_American" title="Scientific American">Scientific American</a></i>.<sup id="cite_ref-Gardner_1972_30-0" class="reference"><a href="#cite_note-Gardner_1972-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup>
</p><p>The code also forms a <a href="Hamiltonian_cycle" class="mw-redirect" title="Hamiltonian cycle">Hamiltonian cycle</a> on a <a href="Hypercube" title="Hypercube">hypercube</a>, where each bit is seen as one dimension.
</p>
<div class="mw-heading mw-heading3"><h3 id="Telegraphy_codes">Telegraphy codes</h3></div>
<p>When the French engineer <a href="%C3%89mile_Baudot" title="Émile Baudot">Émile Baudot</a> changed from using a 6-unit (6-bit) code to 5-unit code for his <a href="Printing_telegraph" title="Printing telegraph">printing telegraph</a> system, in 1875<sup id="cite_ref-Zeman-Fischer_1877_31-0" class="reference"><a href="#cite_note-Zeman-Fischer_1877-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup> or 1876,<sup id="cite_ref-Froehlich-Kent_1991_32-0" class="reference"><a href="#cite_note-Froehlich-Kent_1991-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Fischer_2000_33-0" class="reference"><a href="#cite_note-Fischer_2000-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup> he ordered the alphabetic characters on his print wheel using a reflected binary code, and assigned the codes using only three of the bits to vowels. With vowels and consonants sorted in their alphabetical order,<sup id="cite_ref-Rothen_1884_34-0" class="reference"><a href="#cite_note-Rothen_1884-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Pendry_1920_35-0" class="reference"><a href="#cite_note-Pendry_1920-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-MacMillan_2010_36-0" class="reference"><a href="#cite_note-MacMillan_2010-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup> and other symbols appropriately placed, the 5-bit character code has been recognized as a reflected binary code.<sup id="cite_ref-Knuth_2014_11-4" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> This code became known as <a href="Baudot_code" title="Baudot code">Baudot code</a><sup id="cite_ref-ITU_1909_37-0" class="reference"><a href="#cite_note-ITU_1909-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup> and, with minor changes, was eventually adopted as <a href="International_Telegraph_Alphabet_No._1" class="mw-redirect" title="International Telegraph Alphabet No. 1">International Telegraph Alphabet No.&nbsp;1</a> (ITA1, CCITT-1) in 1932.<sup id="cite_ref-ITU_1933_FR_38-0" class="reference"><a href="#cite_note-ITU_1933_FR-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ITU_1933_EN_39-0" class="reference"><a href="#cite_note-ITU_1933_EN-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-MacMillan_2010_36-1" class="reference"><a href="#cite_note-MacMillan_2010-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup>
</p><p>About the same time, the German-Austrian Otto Schäffler<sup id="cite_ref-Zemanek_1979_40-0" class="reference"><a href="#cite_note-Zemanek_1979-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup> demonstrated another printing telegraph in Vienna using a 5-bit reflected binary code for the same purpose, in 1874.<sup id="cite_ref-Zemanek_1976_41-0" class="reference"><a href="#cite_note-Zemanek_1976-41"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Knuth_2014_11-5" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Analog-to-digital_signal_conversion">Analog-to-digital signal conversion</h3></div>
<p><a href="Frank_Gray_(researcher)" title="Frank Gray (researcher)">Frank Gray</a>, who became famous for inventing the signaling method that came to be used for compatible color television, invented a method to convert analog signals to reflected binary code groups using <a href="Vacuum_tube" title="Vacuum tube">vacuum tube</a>-based apparatus. Filed in 1947, the method and apparatus were granted a patent in 1953,<sup id="cite_ref-Gray_1947_12-1" class="reference"><a href="#cite_note-Gray_1947-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> and the name of Gray stuck to the codes. The "<a href="Pulse-code_modulation#History" title="Pulse-code modulation">PCM tube</a>" apparatus that Gray patented was made by Raymond W. Sears of Bell Labs, working with Gray and William M. Goodall, who credited Gray for the idea of the reflected binary code.<sup id="cite_ref-Goodall_1951_42-0" class="reference"><a href="#cite_note-Goodall_1951-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup>
</p>

<p>Gray was most interested in using the codes to minimize errors in converting analog signals to digital; his codes are still used today for this purpose.
</p>
<div class="mw-heading mw-heading3"><h3 id="Position_encoders">Position encoders</h3></div>

<p>Gray codes are used in linear and rotary position encoders (<a href="Absolute_encoder" class="mw-redirect" title="Absolute encoder">absolute encoders</a> and <a href="Quadrature_encoder" class="mw-redirect" title="Quadrature encoder">quadrature encoders</a>) in preference to weighted binary encoding. This avoids the possibility that, when multiple bits change in the binary representation of a position, a misread will result from some of the bits changing before others.
</p><p>For example, some rotary encoders provide a disk which has an electrically conductive Gray code pattern on concentric rings (tracks). Each track has a stationary metal spring contact that provides electrical contact to the conductive code pattern. Together, these contacts produce output signals in the form of a Gray code. Other encoders employ non-contact mechanisms based on optical or magnetic sensors to produce the Gray code output signals.
</p><p>Regardless of the mechanism or precision of a moving encoder, position measurement error can occur at specific positions (at code boundaries) because the code may be changing at the exact moment it is read (sampled). A binary output code could cause significant position measurement errors because it is impossible to make all bits change at exactly the same time. If, at the moment the position is sampled, some bits have changed and others have not, the sampled position will be incorrect. In the case of absolute encoders, the indicated position may be far away from the actual position and, in the case of incremental encoders, this can corrupt position tracking.
</p><p>In contrast, the Gray code used by position encoders ensures that the codes for any two consecutive positions will differ by only one bit and, consequently, only one bit can change at a time. In this case, the maximum position error will be small, indicating a position adjacent to the actual position.
</p>
<div class="mw-heading mw-heading3"><h3 id="Genetic_algorithms">Genetic algorithms</h3></div>
<p>Due to the <a href="Hamming_distance" title="Hamming distance">Hamming distance</a> properties of Gray codes, they are sometimes used in <a href="Genetic_algorithm" title="Genetic algorithm">genetic algorithms</a>.<sup id="cite_ref-Goldberg_1989_13-1" class="reference"><a href="#cite_note-Goldberg_1989-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> They are very useful in this field, since mutations in the code allow for mostly incremental changes, but occasionally a single bit-change can cause a big leap and lead to new properties.
</p>
<div class="mw-heading mw-heading3"><h3 id="Boolean_circuit_minimization">Boolean circuit minimization</h3></div>
<p>Gray codes are also used in labelling the axes of <a href="Karnaugh_map" title="Karnaugh map">Karnaugh maps</a> since 1953<sup id="cite_ref-Karnaugh_1953_43-0" class="reference"><a href="#cite_note-Karnaugh_1953-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Wakerly_1994_44-0" class="reference"><a href="#cite_note-Wakerly_1994-44"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Brown_2012_45-0" class="reference"><a href="#cite_note-Brown_2012-45"><span class="cite-bracket">[</span>45<span class="cite-bracket">]</span></a></sup> as well as in <a href="H%C3%A4ndler_circle_graph" class="mw-redirect" title="Händler circle graph">Händler circle graphs</a> since 1958,<sup id="cite_ref-Händler_1958_46-0" class="reference"><a href="#cite_note-Händler_1958-46"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Wagner_1967_47-0" class="reference"><a href="#cite_note-Steinbuch-Wagner_1967-47"><span class="cite-bracket">[</span>47<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ISER_1_48-0" class="reference"><a href="#cite_note-ISER_1-48"><span class="cite-bracket">[</span>48<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ISER_2_49-0" class="reference"><a href="#cite_note-ISER_2-49"><span class="cite-bracket">[</span>49<span class="cite-bracket">]</span></a></sup> both graphical methods for <a href="Logic_circuit_minimization" class="mw-redirect" title="Logic circuit minimization">logic circuit minimization</a>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Error_correction">Error correction</h3></div>
<p>In modern <a href="Digital_communications" class="mw-redirect" title="Digital communications">digital communications</a>, 1D- and 2D-Gray codes play an important role in error prevention before applying an <a href="Error_correction" class="mw-redirect" title="Error correction">error correction</a>. For example, in a <a href="Digital_modulation" class="mw-redirect" title="Digital modulation">digital modulation</a> scheme such as <a href="Quadrature_amplitude_modulation" title="Quadrature amplitude modulation">QAM</a> where data is typically transmitted in <a href="Symbol_rate" title="Symbol rate">symbols</a> of 4 bits or more, the signal's <a href="Constellation_diagram" title="Constellation diagram">constellation diagram</a> is arranged so that the bit patterns conveyed by adjacent constellation points differ by only one bit. By combining this with <a href="Forward_error_correction" class="mw-redirect" title="Forward error correction">forward error correction</a> capable of correcting single-bit errors, it is possible for a <a href="Receiver_(radio)" class="mw-redirect" title="Receiver (radio)">receiver</a> to correct any transmission errors that cause a constellation point to deviate into the area of an adjacent point. This makes the transmission system less susceptible to <a href="Noise" title="Noise">noise</a>.
</p>
<ul style="text-align:left" class="gallery mw-gallery-packed">
<li class="gallerybox" style="width: 122px">
<div class="thumb" style="width: 120px;"><span typeof="mw:File"></span></div>
<div class="gallerytext">Codes 4-PSK</div>
</li>
<li class="gallerybox" style="width: 122px">
<div class="thumb" style="width: 120px;"><span typeof="mw:File"></span></div>
<div class="gallerytext">Codes 8-PSK</div>
</li>
<li class="gallerybox" style="width: 119.33333333333px">
<div class="thumb" style="width: 117.33333333333px;"><span typeof="mw:File"></span></div>
<div class="gallerytext">Codes 16-QAM</div>
</li>
</ul>
<div class="mw-heading mw-heading3"><h3 id="Communication_between_clock_domains">Communication between clock domains</h3></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Clock_domain_crossing" title="Clock domain crossing">Clock domain crossing</a></div>
<p>Digital logic designers use Gray codes extensively for passing multi-bit count information between synchronous logic that operates at different clock frequencies. The logic is considered operating in different "clock domains". It is fundamental to the design of large chips that operate with many different clocking frequencies.
</p>
<div class="mw-heading mw-heading3"><h3 id="Cycling_through_states_with_minimal_effort">Cycling through states with minimal effort</h3></div>
<p>If a system has to cycle sequentially through all possible combinations of on-off states of some set of controls, and the changes of the controls require non-trivial expense (e.g. time, wear, human work), a Gray code minimizes the number of setting changes to just one change for each combination of states. An example would be testing a piping system for all combinations of settings of its manually operated valves.
</p><p>A <a href="Balanced_Gray_code" class="mw-redirect" title="Balanced Gray code">balanced Gray code</a> can be constructed,<sup id="cite_ref-Bhat-Savage_1996_50-0" class="reference"><a href="#cite_note-Bhat-Savage_1996-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup> that flips every bit equally often. Since bit-flips are evenly distributed, this is optimal in the following way: balanced Gray codes minimize the maximal count of bit-flips for each digit.
</p>
<div class="mw-heading mw-heading4"><h4 id="Gray_code_counters_and_arithmetic">Gray code counters and arithmetic</h4></div>
<p><a href="George_R._Stibitz" class="mw-redirect" title="George R. Stibitz">George R. Stibitz</a> utilized a reflected binary code in a binary pulse counting device in 1941 already.<sup id="cite_ref-Stibitz_1941_9-2" class="reference"><a href="#cite_note-Stibitz_1941-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Winder_1959_10-4" class="reference"><a href="#cite_note-Winder_1959-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Knuth_2014_11-6" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p><p>A typical use of Gray code counters is building a <a href="FIFO_(computing_and_electronics)" title="FIFO (computing and electronics)">FIFO</a> (first-in, first-out) data buffer that has read and write ports that exist in different clock domains. The input and output counters inside such a dual-port FIFO are often stored using Gray code to prevent invalid transient states from being captured when the count crosses clock domains.<sup id="cite_ref-Donohue_2003_51-0" class="reference"><a href="#cite_note-Donohue_2003-51"><span class="cite-bracket">[</span>51<span class="cite-bracket">]</span></a></sup> The updated read and write pointers need to be passed between clock domains when they change, to be able to track FIFO empty and full status in each domain. Each bit of the pointers is sampled non-deterministically for this clock domain transfer. So for each bit, either the old value or the new value is propagated. Therefore, if more than one bit in the multi-bit pointer is changing at the sampling point, a "wrong" binary value (neither new nor old) can be propagated. By guaranteeing only one bit can be changing, Gray codes guarantee that the only possible sampled values are the new or old multi-bit value. Typically Gray codes of power-of-two length are used.
</p><p>Sometimes digital buses in electronic systems are used to convey quantities that can only increase or decrease by one at a time, for example the output of an event counter which is being passed between clock domains or to a digital-to-analog converter. The advantage of Gray codes in these applications is that differences in the propagation delays of the many wires that represent the bits of the code cannot cause the received value to go through states that are out of the Gray code sequence. This is similar to the advantage of Gray codes in the construction of mechanical encoders, however the source of the Gray code is an electronic counter in this case. The counter itself must count in Gray code, or if the counter runs in binary then the output value from the counter must be reclocked after it has been converted to Gray code, because when a value is converted from binary to Gray code,<sup id="cite_ref-NB_Arithmetic_conversion_52-0" class="reference"><a href="#cite_note-NB_Arithmetic_conversion-52"><span class="cite-bracket">[</span>nb 1<span class="cite-bracket">]</span></a></sup> it is possible that differences in the arrival times of the binary data bits into the binary-to-Gray conversion circuit will mean that the code could go briefly through states that are wildly out of sequence. Adding a clocked register after the circuit that converts the count value to Gray code may introduce a clock cycle of latency, so counting directly in Gray code may be advantageous.<sup id="cite_ref-Hulst_1957_53-0" class="reference"><a href="#cite_note-Hulst_1957-53"><span class="cite-bracket">[</span>52<span class="cite-bracket">]</span></a></sup>
</p><p>To produce the next count value in a Gray-code counter, it is necessary to have some combinational logic that will increment the current count value that is stored. One way to increment a Gray code number is to convert it into ordinary binary code,<sup id="cite_ref-Powell_1968_54-0" class="reference"><a href="#cite_note-Powell_1968-54"><span class="cite-bracket">[</span>53<span class="cite-bracket">]</span></a></sup> add one to it with a standard binary adder, and then convert the result back to Gray code.<sup id="cite_ref-Mehta-Owens-Irwin_1996_55-0" class="reference"><a href="#cite_note-Mehta-Owens-Irwin_1996-55"><span class="cite-bracket">[</span>54<span class="cite-bracket">]</span></a></sup> Other methods of counting in Gray code are discussed in a report by <a href="Robert_W._Doran" title="Robert W. Doran">Robert W. Doran</a>, including taking the output from the first latches of the master-slave flip flops in a binary ripple counter.<sup id="cite_ref-Doran_2007_56-0" class="reference"><a href="#cite_note-Doran_2007-56"><span class="cite-bracket">[</span>55<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="Gray_code_addressing">Gray code addressing</h4></div>
<p>As the execution of <a href="Program_code" class="mw-redirect" title="Program code">program code</a> typically causes an instruction memory access pattern of locally consecutive addresses, <a href="Bus_encoding" title="Bus encoding">bus encodings</a> using Gray code addressing instead of binary addressing can reduce the number of state changes of the address bits significantly, thereby reducing the <a href="CPU_power_consumption" class="mw-redirect" title="CPU power consumption">CPU power consumption</a> in some low-power designs.<sup id="cite_ref-Su-Tsui-Despain_1994_57-0" class="reference"><a href="#cite_note-Su-Tsui-Despain_1994-57"><span class="cite-bracket">[</span>56<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Guo-Parameswaran_2010_58-0" class="reference"><a href="#cite_note-Guo-Parameswaran_2010-58"><span class="cite-bracket">[</span>57<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Constructing_an_n-bit_Gray_code">Constructing an <i>n</i>-bit Gray code</h2></div>


<p>The binary-reflected Gray code list for <i>n</i> bits can be generated <a href="Recursion" title="Recursion">recursively</a> from the list for <i>n</i>&nbsp;−&nbsp;1 bits by reflecting the list (i.e. listing the entries in reverse order), prefixing the entries in the original list with a binary <span class="monospaced">0</span>, prefixing the entries in the reflected list with a binary&nbsp;<span class="monospaced">1</span>, and then concatenating the original list with the reversed list.<sup id="cite_ref-Knuth_2014_11-7" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> For example, generating the <i>n</i>&nbsp;=&nbsp;3 list from the <i>n</i>&nbsp;=&nbsp;2 list:
</p>
<table cellpadding="5" border="0" style="margin: 1em;">

<tbody><tr>
<td>2-bit list:
</td>
<td><span class="monospaced">00</span>, <span class="monospaced">01</span>, <span class="monospaced">11</span>, <span class="monospaced">10</span>
</td>
<td>&nbsp;
</td></tr>
<tr>
<td>Reflected:
</td>
<td>&nbsp;
</td>
<td><span class="monospaced">10</span>, <span class="monospaced">11</span>, <span class="monospaced">01</span>, <span class="monospaced">00</span>
</td></tr>
<tr>
<td>Prefix old entries with <span class="monospaced">0</span>:
</td>
<td><span class="monospaced">000</span>, <span class="monospaced">001</span>, <span class="monospaced">011</span>, <span class="monospaced">010</span>,
</td>
<td>&nbsp;
</td></tr>
<tr>
<td>Prefix new entries with <span class="monospaced">1</span>:
</td>
<td>&nbsp;
</td>
<td><span class="monospaced">110</span>, <span class="monospaced">111</span>, <span class="monospaced">101</span>, <span class="monospaced">100</span>
</td></tr>
<tr>
<td>Concatenated:
</td>
<td><span class="monospaced">000</span>, <span class="monospaced">001</span>, <span class="monospaced">011</span>, <span class="monospaced">010</span>,
</td>
<td><span class="monospaced">110</span>, <span class="monospaced">111</span>, <span class="monospaced">101</span>, <span class="monospaced">100</span>
</td></tr></tbody></table>
<p>The one-bit Gray code is <i>G</i><sub>1</sub>&nbsp;=&nbsp;(<span class="monospaced">0,1</span>). This can be thought of as built recursively as above from a zero-bit Gray code <i>G</i><sub>0</sub>&nbsp;=&nbsp;(&nbsp;<a href="Empty_string" title="Empty string">Λ</a>&nbsp;) consisting of a single entry of zero length. This iterative process of generating <i>G</i><sub><i>n</i>+1</sub> from <i>G</i><sub><i>n</i></sub> makes the following properties of the standard reflecting code clear:
</p>
<ul><li><i>G</i><sub><i>n</i></sub> is a <a href="Permutation" title="Permutation">permutation</a> of the numbers 0, ..., 2<sup><i>n</i></sup>&nbsp;−&nbsp;1. (Each number appears exactly once in the list.)</li>
<li><i>G</i><sub><i>n</i></sub> is embedded as the first half of <i>G</i><sub><i>n</i>+1</sub>.</li>
<li>Therefore, the coding is <i>stable</i>, in the sense that once a binary number appears in <i>G</i><sub><i>n</i></sub> it appears in the same position in all longer lists; so it makes sense to talk about <i>the</i> reflective Gray code value of a number: <i>G</i>(<i>m</i>) = the <i>m</i>th reflecting Gray code, counting from 0.</li>
<li>Each entry in <i>G</i><sub><i>n</i></sub> differs by only one bit from the previous entry. (The Hamming distance is 1.)</li>
<li>The last entry in <i>G</i><sub><i>n</i></sub> differs by only one bit from the first entry. (The code is cyclic.)</li></ul>
<p>These characteristics suggest a simple and fast method of translating a binary value into the corresponding Gray code. Each bit is inverted if the next higher bit of the input value is set to one. This can be performed in parallel by a bit-shift and exclusive-or operation if they are available: the <i>n</i>th Gray code is obtained by computing <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\oplus \left\lfloor {\tfrac {n}{2}}\right\rfloor }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
<mo>⊕<!-- ⊕ --></mo>
<mrow>
<mo>⌊</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<mi>n</mi>
<mn>2</mn>
</mfrac>
</mstyle>
</mrow>
<mo>⌋</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n\oplus \left\lfloor {\tfrac {n}{2}}\right\rfloor }</annotation>
</semantics>
</math></span><img src="./3bfd09e4509c5e63682f012086a7e8453ca51613.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:8.252ex; height:3.343ex;" alt="{\displaystyle n\oplus \left\lfloor {\tfrac {n}{2}}\right\rfloor }" loading="lazy"></span>. Prepending a <span class="monospaced">0</span> bit leaves the order of the code words unchanged, prepending a <span class="monospaced">1</span> bit reverses the order of the code words. If the bits at position <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span> of codewords are inverted, the order of neighbouring blocks of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2^{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2^{i}}</annotation>
</semantics>
</math></span><img src="./fa70ee9ac3ded8d4793dea44c62d02e5b50012b4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.962ex; height:2.676ex;" alt="{\displaystyle 2^{i}}" loading="lazy"></span> codewords is reversed. For example, if bit 0 is inverted in a 3 bit codeword sequence, the order of two neighbouring codewords is reversed
</p>
<style data-mw-deduplicate="TemplateStyles:r996643573">
/* start https://en.wikipedia.org/ */


.mw-parser-output .block-indent{padding-left:3em;padding-right:0;overflow:hidden}


/* end https://en.wikipedia.org/ */
</style><div class="block-indent">000,001,010,011,100,101,110,111 → 001,000,011,010,101,100,111,110 <span style="padding-left:2em;">&nbsp;</span>(invert bit 0)</div>
<p>If bit 1 is inverted, blocks of 2 codewords change order:
</p>
<div class="block-indent"> 000,001,010,011,100,101,110,111 → 010,011,000,001,110,111,100,101 <span style="padding-left:2em;">&nbsp;</span>(invert bit 1)</div>
<p>If bit 2 is inverted, blocks of 4 codewords reverse order:
</p>
<div class="block-indent"> 000,001,010,011,100,101,110,111 → 100,101,110,111,000,001,010,011 <span style="padding-left:2em;">&nbsp;</span>(invert bit 2)</div>
<p>Thus, performing an <a href="Exclusive_or" title="Exclusive or">exclusive or</a> on a bit <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{i}}</annotation>
</semantics>
</math></span><img src="./40a8c2db2990a53c683e75961826167c5adac7c3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.797ex; height:2.509ex;" alt="{\displaystyle b_{i}}" loading="lazy"></span> at position <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span> with the bit <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{i+1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{i+1}}</annotation>
</semantics>
</math></span><img src="./acb2a07c8e842f16a609604989f19548ac6ec4e5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.898ex; height:2.509ex;" alt="{\displaystyle b_{i+1}}" loading="lazy"></span> at position <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i+1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i+1}</annotation>
</semantics>
</math></span><img src="./2fe1bfc8314922e4c3fdb4e8eceb20a00b4f011d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:4.805ex; height:2.343ex;" alt="{\displaystyle i+1}" loading="lazy"></span> leaves the order of codewords intact if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{i+1}={\mathtt {0}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">0</mn>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{i+1}={\mathtt {0}}}</annotation>
</semantics>
</math></span><img src="./fcbebc3dc4f071fe7c70f81c4396c6f57d55be0d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.217ex; height:2.509ex;" alt="{\displaystyle b_{i+1}={\mathtt {0}}}" loading="lazy"></span>, and reverses the order of blocks of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2^{i+1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2^{i+1}}</annotation>
</semantics>
</math></span><img src="./e52aa0548e7625590c7af4776d3bb2d8b228b7f7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.063ex; height:2.676ex;" alt="{\displaystyle 2^{i+1}}" loading="lazy"></span> codewords if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{i+1}={\mathtt {1}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">1</mn>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{i+1}={\mathtt {1}}}</annotation>
</semantics>
</math></span><img src="./425bf9259d0f6deb0ae731f79a4bfe992fe536d1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.217ex; height:2.509ex;" alt="{\displaystyle b_{i+1}={\mathtt {1}}}" loading="lazy"></span>. Now, this is exactly the same operation as the reflect-and-prefix method to generate the Gray code.
</p><p>A similar method can be used to perform the reverse translation, but the computation of each bit depends on the computed value of the next higher bit so it cannot be performed in parallel. Assuming <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle g_{i}}</annotation>
</semantics>
</math></span><img src="./2ce36142a0a1c6660e82bdf3ef3f1551317efe0c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.909ex; height:2.009ex;" alt="{\displaystyle g_{i}}" loading="lazy"></span> is the <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span>th Gray-coded bit (<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle g_{0}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle g_{0}}</annotation>
</semantics>
</math></span><img src="./32d13273b9af4564fa2c421c96d039c414db8628.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.163ex; height:2.009ex;" alt="{\displaystyle g_{0}}" loading="lazy"></span> being the most significant bit), and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{i}}</annotation>
</semantics>
</math></span><img src="./40a8c2db2990a53c683e75961826167c5adac7c3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.797ex; height:2.509ex;" alt="{\displaystyle b_{i}}" loading="lazy"></span> is the <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span>th binary-coded bit (<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{0}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{0}}</annotation>
</semantics>
</math></span><img src="./9e425056f502ca07b103ffbf6ac4720e0f8a01f0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.052ex; height:2.509ex;" alt="{\displaystyle b_{0}}" loading="lazy"></span> being the most-significant bit), the reverse translation can be given recursively: <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{0}=g_{0}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>=</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{0}=g_{0}}</annotation>
</semantics>
</math></span><img src="./6133f7bba78458fab1f9445bba9630767bd273b3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.314ex; height:2.509ex;" alt="{\displaystyle b_{0}=g_{0}}" loading="lazy"></span>, and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b_{i}=g_{i}\oplus b_{i-1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>=</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>⊕<!-- ⊕ --></mo>
<msub>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b_{i}=g_{i}\oplus b_{i-1}}</annotation>
</semantics>
</math></span><img src="./94e475811b99b1a87e506f6046e680d2e680c229.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:13.543ex; height:2.509ex;" alt="{\displaystyle b_{i}=g_{i}\oplus b_{i-1}}" loading="lazy"></span>. Alternatively, decoding a Gray code into a binary number can be described as a <a href="Prefix_sum" title="Prefix sum">prefix sum</a> of the bits in the Gray code, where each individual summation operation in the prefix sum is performed modulo two.
</p><p>To construct the binary-reflected Gray code iteratively, at step 0 start with the <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathrm {code} _{0}={\mathtt {0}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">c</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">d</mi>
<mi mathvariant="normal">e</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">0</mn>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathrm {code} _{0}={\mathtt {0}}}</annotation>
</semantics>
</math></span><img src="./f07d899d497630fce46d9371795a610ceaed6743.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:9.893ex; height:2.509ex;" alt="{\displaystyle \mathrm {code} _{0}={\mathtt {0}}}" loading="lazy"></span>, and at step <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i>0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
<mo>&gt;</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i&gt;0}</annotation>
</semantics>
</math></span><img src="./1f49f2878fd68a89c3da37eb537198e887cf0293.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.063ex; height:2.176ex;" alt="{\displaystyle i>0}" loading="lazy"></span> find the bit position of the least significant <span class="monospaced">1</span> in the binary representation of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span> and flip the bit at that position in the previous code <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathrm {code} _{i-1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">c</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">d</mi>
<mi mathvariant="normal">e</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathrm {code} _{i-1}}</annotation>
</semantics>
</math></span><img src="./bd5969b7fb9bb6b6da0872104cb3c92840bbe3b3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.42ex; height:2.509ex;" alt="{\displaystyle \mathrm {code} _{i-1}}" loading="lazy"></span> to get the next code <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathrm {code} _{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">c</mi>
<mi mathvariant="normal">o</mi>
<mi mathvariant="normal">d</mi>
<mi mathvariant="normal">e</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathrm {code} _{i}}</annotation>
</semantics>
</math></span><img src="./16e203afce9854e688043f56db70689240677dee.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.319ex; height:2.509ex;" alt="{\displaystyle \mathrm {code} _{i}}" loading="lazy"></span>. The bit positions start 0, 1, 0, 2, 0, 1, 0, 3, ...<sup id="cite_ref-NB_OEIS_A007814_59-0" class="reference"><a href="#cite_note-NB_OEIS_A007814-59"><span class="cite-bracket">[</span>nb 2<span class="cite-bracket">]</span></a></sup> See <a href="Find_first_set" title="Find first set">find first set</a> for efficient algorithms to compute these values.
</p>
<div class="mw-heading mw-heading2"><h2 id="Converting_to_and_from_Gray_code">Converting to and from Gray code</h2></div>
<p>The following functions in <a href="C_(programming_language)" title="C (programming language)">C</a> convert between binary numbers and their associated Gray codes. While it may seem that Gray-to-binary conversion requires each bit to be handled one at a time, faster algorithms exist.<sup id="cite_ref-Dietz_2002_60-0" class="reference"><a href="#cite_note-Dietz_2002-60"><span class="cite-bracket">[</span>58<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Powell_1968_54-1" class="reference"><a href="#cite_note-Powell_1968-54"><span class="cite-bracket">[</span>53<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Arithmetic_conversion_52-1" class="reference"><a href="#cite_note-NB_Arithmetic_conversion-52"><span class="cite-bracket">[</span>nb 1<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="k">typedef</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">uint</span><span class="p">;</span>

<span class="c1">// This function converts an unsigned binary number to reflected binary Gray code.</span>
<span class="n">uint</span><span class="w"> </span><span class="nf">BinaryToGray</span><span class="p">(</span><span class="n">uint</span><span class="w"> </span><span class="n">num</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">^</span><span class="w"> </span><span class="p">(</span><span class="n">num</span><span class="w"> </span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span><span class="w"> </span><span class="c1">// The operator &gt;&gt; is shift right. The operator ^ is exclusive or.</span>
<span class="p">}</span>

<span class="c1">// This function converts a reflected binary Gray code number to a binary number.</span>
<span class="n">uint</span><span class="w"> </span><span class="nf">GrayToBinary</span><span class="p">(</span><span class="n">uint</span><span class="w"> </span><span class="n">num</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="n">uint</span><span class="w"> </span><span class="n">mask</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">num</span><span class="p">;</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">mask</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// Each Gray code bit is exclusive-ored with all more significant bits.</span>
<span class="w"> </span><span class="n">mask</span><span class="w"> </span><span class="o">&gt;&gt;=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
<span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">^=</span><span class="w"> </span><span class="n">mask</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">num</span><span class="p">;</span>
<span class="p">}</span>

<span class="c1">// A more efficient version for Gray codes 32 bits or fewer through the use of SWAR (SIMD within a register) techniques. </span>
<span class="c1">// It implements a parallel prefix XOR function. The assignment statements can be in any order.</span>
<span class="c1">// </span>
<span class="c1">// This function can be adapted for longer Gray codes by adding steps.</span>

<span class="n">uint</span><span class="w"> </span><span class="nf">GrayToBinary32</span><span class="p">(</span><span class="n">uint</span><span class="w"> </span><span class="n">num</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">^=</span><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="mi">16</span><span class="p">;</span>
<span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">^=</span><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="mi">8</span><span class="p">;</span>
<span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">^=</span><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span>
<span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">^=</span><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
<span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">^=</span><span class="w"> </span><span class="n">num</span><span class="w"> </span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">num</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1">// A Four-bit-at-once variant changes a binary number (abcd)2 to (abcd)2 ^ (00ab)2, then to (abcd)2 ^ (00ab)2 ^ (0abc)2 ^ (000a)2.</span>
</pre></div>
<p>On newer processors, the number of ALU instructions in the decoding step can be reduced by taking advantage of the <a href="CLMUL_instruction_set" title="CLMUL instruction set">CLMUL instruction set</a>. If MASK is the constant binary string of ones ended with a single zero digit, then carryless multiplication of MASK with the grey encoding of x will always give either x or its bitwise negation.
</p>
<div class="mw-heading mw-heading2"><h2 id="Special_types_of_Gray_codes">Special types of Gray codes</h2></div>
<p>In practice, "Gray code" almost always refers to a binary-reflected Gray code (BRGC). However, mathematicians have discovered other kinds of Gray codes. Like BRGCs, each consists of a list of words, where each word differs from the next in only one digit (each word has a <a href="Hamming_distance" title="Hamming distance">Hamming distance</a> of 1 from the next word).
</p>
<div class="mw-heading mw-heading3"><h3 id="Gray_codes_with_n_bits_and_of_length_less_than_2n">Gray codes with <i>n</i> bits and of length less than 2<sup><i>n</i></sup></h3></div>
<p>It is possible to construct binary Gray codes with <i>n</i> bits with a length of less than <span class="texhtml">2<sup><i>n</i></sup></span>, if the length is even. One possibility is to start with a balanced Gray code and remove pairs of values at either the beginning and the end, or in the middle.<sup id="cite_ref-61" class="reference"><a href="#cite_note-61"><span class="cite-bracket">[</span>59<span class="cite-bracket">]</span></a></sup> <a href="OEIS" class="mw-redirect" title="OEIS">OEIS</a> sequence A290772 <sup id="cite_ref-62" class="reference"><a href="#cite_note-62"><span class="cite-bracket">[</span>60<span class="cite-bracket">]</span></a></sup> gives the number of possible Gray sequences of length <span class="texhtml">2<i>n</i></span> that include zero and use the minimum number of bits.
</p>
<div class="mw-heading mw-heading3"><h3 id="n-ary_Gray_code"><i>n</i>-ary Gray code </h3></div>
<table border="0" cellpadding="10" align="right">

<tbody><tr>
<td>
<table width="150" align="right" cellpadding="5" border="1" style="border-collapse: collapse;">

<tbody><tr>
<td align="right"><i>Ternary number → ternary Gray code</i><br><div class="monospaced">
<p>0 → 000<br>
1 → 001<br>
2 → 002<br>
10 → 012<br>
11 → 011<br>
12 → 010<br>
20 → 020<br>
21 → 021<br>
22 → 022<br>
100 → 122<br>
101 → 121<br>
102 → 120<br>
110 → 110<br>
111 → 111<br>
112 → 112<br>
120 → 102<br>
121 → 101<br>
122 → 100<br>
200 → 200<br>
201 → 201<br>
202 → 202<br>
210 → 212<br>
211 → 211<br>
212 → 210<br>
220 → 220<br>
221 → 221<br>
</p>
222 → 222</div>
</td></tr></tbody></table>
</td></tr></tbody></table>
<p>There are many specialized types of Gray codes other than the binary-reflected Gray code. One such type of Gray code is the <b><i>n</i>-ary Gray code</b>, also known as a <b>non-Boolean Gray code</b>. As the name implies, this type of Gray code uses non-<a href="Boolean_data_type" title="Boolean data type">Boolean</a> values in its encodings.
</p><p>For example, a 3-ary (<a href="Ternary_numeral_system" title="Ternary numeral system">ternary</a>) Gray code would use the values 0,1,2.<sup id="cite_ref-Herter-Rote_2016_29-1" class="reference"><a href="#cite_note-Herter-Rote_2016-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup> The (<i>n</i>,&nbsp;<i>k</i>)-<i>Gray code</i> is the <i>n</i>-ary Gray code with <i>k</i> digits.<sup id="cite_ref-Guan_1998_63-0" class="reference"><a href="#cite_note-Guan_1998-63"><span class="cite-bracket">[</span>61<span class="cite-bracket">]</span></a></sup>
The sequence of elements in the (3,&nbsp;2)-Gray code is: 00,01,02,12,11,10,20,21,22. The (<i>n</i>,&nbsp;<i>k</i>)-Gray code may be constructed recursively, as the BRGC, or may be constructed <a href="Iteration" title="Iteration">iteratively</a>. An <a href="Algorithm" title="Algorithm">algorithm</a> to iteratively generate the (<i>N</i>,&nbsp;<i>k</i>)-Gray code is presented (in <a href="C_(programming_language)" title="C (programming language)">C</a>):
</p>
<div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span class="c1">// inputs: base, digits, value</span>
<span class="c1">// output: Gray</span>
<span class="c1">// Convert a value to a Gray code with the given base and digits.</span>
<span class="c1">// Iterating through a sequence of values would result in a sequence</span>
<span class="c1">// of Gray codes in which only one digit changes at a time.</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">toGray</span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">digits</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">gray</span><span class="p">[</span><span class="n">digits</span><span class="p">])</span>
<span class="p">{</span><span class="w"> </span>
<span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">baseN</span><span class="p">[</span><span class="n">digits</span><span class="p">];</span><span class="w"> </span><span class="c1">// Stores the ordinary base-N number, one digit per entry</span>
<span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">i</span><span class="p">;</span><span class="w"> </span><span class="c1">// The loop variable</span>
<span class="w"> </span>
<span class="w"> </span><span class="c1">// Put the normal baseN number into the baseN array. For base 10, 109 </span>
<span class="w"> </span><span class="c1">// would be stored as [9,0,1]</span>
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">digits</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">baseN</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">base</span><span class="p">;</span>
<span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">base</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span>
<span class="w"> </span><span class="c1">// Convert the normal baseN number into the Gray code equivalent. Note that</span>
<span class="w"> </span><span class="c1">// the loop starts at the most significant digit and goes down.</span>
<span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="n">shift</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="o">--</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="c1">// The Gray digit gets shifted down by the sum of the higher</span>
<span class="w"> </span><span class="c1">// digits.</span>
<span class="w"> </span><span class="n">gray</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">baseN</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">shift</span><span class="p">)</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">base</span><span class="p">;</span>
<span class="w"> </span><span class="n">shift</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">shift</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">base</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">gray</span><span class="p">[</span><span class="n">i</span><span class="p">];</span><span class="w"> </span><span class="c1">// Subtract from base so shift is positive</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
<span class="c1">// EXAMPLES</span>
<span class="c1">// input: value = 1899, base = 10, digits = 4</span>
<span class="c1">// output: baseN[] = [9,9,8,1], gray[] = [0,1,7,1]</span>
<span class="c1">// input: value = 1900, base = 10, digits = 4</span>
<span class="c1">// output: baseN[] = [0,0,9,1], gray[] = [0,1,8,1]</span>
</pre></div>
<p>There are other Gray code algorithms for (<i>n</i>,<i>k</i>)-Gray codes. The (<i>n</i>,<i>k</i>)-Gray code produced by the above algorithm is always cyclical; some algorithms, such as that by Guan,<sup id="cite_ref-Guan_1998_63-1" class="reference"><a href="#cite_note-Guan_1998-63"><span class="cite-bracket">[</span>61<span class="cite-bracket">]</span></a></sup> lack this property when <i>k</i> is odd. On the other hand, while only one digit at a time changes with this method, it can change by wrapping (looping from <i>n</i>&nbsp;−&nbsp;1 to 0). In Guan's algorithm, the count alternately rises and falls, so that the numeric difference between two Gray code digits is always one.
</p><p>Gray codes are not uniquely defined, because a permutation of the columns of such a code is a Gray code too. The above procedure produces a code in which the lower the significance of a digit, the more often it changes, making it similar to normal counting methods.
</p><p>See also <a href="Skew_binary_number_system" title="Skew binary number system">Skew binary number system</a>, a variant ternary number system where at most two digits change on each increment, as each increment can be done with at most one digit <a href="Carry_(arithmetic)" title="Carry (arithmetic)">carry</a> operation.
</p>
<div class="mw-heading mw-heading3"><h3 id="Balanced_Gray_code">Balanced Gray code</h3></div>
<p>Although the binary reflected Gray code is useful in many scenarios, it is not optimal in certain cases because of a lack of "uniformity".<sup id="cite_ref-Bhat-Savage_1996_50-1" class="reference"><a href="#cite_note-Bhat-Savage_1996-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup> In <b>balanced Gray codes</b>, the number of changes in different coordinate positions are as close as possible. To make this more precise, let <i>G</i> be an <i>R</i>-ary complete Gray cycle having transition sequence <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\delta _{k})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<msub>
<mi>δ<!-- δ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (\delta _{k})}</annotation>
</semantics>
</math></span><img src="./c1253278780d295ecfd87fd59567a13c74401c1e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.93ex; height:2.843ex;" alt="{\displaystyle (\delta _{k})}" loading="lazy"></span>; the <i>transition counts</i> (<i>spectrum</i>) of <i>G</i> are the collection of integers defined by
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda _{k}=|\{j\in \mathbb {Z} _{R^{n}}:\delta _{j}=k\}|\,,{\text{ for }}k\in \mathbb {Z} _{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>λ<!-- λ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mo fence="false" stretchy="false">{</mo>
<mi>j</mi>
<mo>∈<!-- ∈ --></mo>
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi>R</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
</mrow>
</msub>
<mo>:</mo>
<msub>
<mi>δ<!-- δ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
</mrow>
</msub>
<mo>=</mo>
<mi>k</mi>
<mo fence="false" stretchy="false">}</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mspace width="thinmathspace"></mspace>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;for&nbsp;</mtext>
</mrow>
<mi>k</mi>
<mo>∈<!-- ∈ --></mo>
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda _{k}=|\{j\in \mathbb {Z} _{R^{n}}:\delta _{j}=k\}|\,,{\text{ for }}k\in \mathbb {Z} _{n}}</annotation>
</semantics>
</math></span></span>
</p><p>A Gray code is <i>uniform</i> or <i>uniformly balanced</i> if its transition counts are all equal, in which case we have <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda _{k}={\tfrac {R^{n}}{n}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>λ<!-- λ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<msup>
<mi>R</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mi>n</mi>
</mfrac>
</mstyle>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda _{k}={\tfrac {R^{n}}{n}}}</annotation>
</semantics>
</math></span><img src="./54d979ab54f1cebbc73ccaf3bc3aedb9e6b8e073.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:8.591ex; height:3.509ex;" alt="{\displaystyle \lambda _{k}={\tfrac {R^{n}}{n}}}" loading="lazy"></span> for all <i>k</i>. Clearly, when <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle R=2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>R</mi>
<mo>=</mo>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle R=2}</annotation>
</semantics>
</math></span><img src="./6fc410f6099504d720fe0c34b1a1d75cb815d356.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.025ex; height:2.176ex;" alt="{\displaystyle R=2}" loading="lazy"></span>, such codes exist only if <i>n</i> is a power of 2.<sup id="cite_ref-64" class="reference"><a href="#cite_note-64"><span class="cite-bracket">[</span>62<span class="cite-bracket">]</span></a></sup> If <i>n</i> is not a power of 2, it is possible to construct <i>well-balanced</i> binary codes where the difference between two transition counts is at most 2; so that (combining both cases) every transition count is either <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2\left\lfloor {\tfrac {2^{n}}{2n}}\right\rfloor }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>2</mn>
<mrow>
<mo>⌊</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mrow>
<mn>2</mn>
<mi>n</mi>
</mrow>
</mfrac>
</mstyle>
</mrow>
<mo>⌋</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2\left\lfloor {\tfrac {2^{n}}{2n}}\right\rfloor }</annotation>
</semantics>
</math></span><img src="./dade8925dd072bd0b343f29ecb752ef9a1fe7270.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:6.649ex; height:4.843ex;" alt="{\displaystyle 2\left\lfloor {\tfrac {2^{n}}{2n}}\right\rfloor }" loading="lazy"></span> or <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2\left\lceil {\tfrac {2^{n}}{2n}}\right\rceil }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>2</mn>
<mrow>
<mo>⌈</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mfrac>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mrow>
<mn>2</mn>
<mi>n</mi>
</mrow>
</mfrac>
</mstyle>
</mrow>
<mo>⌉</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2\left\lceil {\tfrac {2^{n}}{2n}}\right\rceil }</annotation>
</semantics>
</math></span><img src="./dc51ba340f415824365b9b78fb89d1a286a1e692.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:6.649ex; height:4.843ex;" alt="{\displaystyle 2\left\lceil {\tfrac {2^{n}}{2n}}\right\rceil }" loading="lazy"></span>.<sup id="cite_ref-Bhat-Savage_1996_50-2" class="reference"><a href="#cite_note-Bhat-Savage_1996-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup> Gray codes can also be <i>exponentially balanced</i> if all of their transition counts are adjacent powers of two, and such codes exist for every power of two.<sup id="cite_ref-Suparta_2005_65-0" class="reference"><a href="#cite_note-Suparta_2005-65"><span class="cite-bracket">[</span>63<span class="cite-bracket">]</span></a></sup>
</p><p>For example, a balanced 4-bit Gray code has 16 transitions, which can be evenly distributed among all four positions (four transitions per position), making it uniformly balanced:<sup id="cite_ref-Bhat-Savage_1996_50-3" class="reference"><a href="#cite_note-Bhat-Savage_1996-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup>
</p>
<div class="block-indent"><span class="monospaced">0 <span style="color:red;">1</span> 1 1 1 1 1 <span style="color:red;">0</span> 0 0 0 0 0 <span style="color:red;">1</span> 1 <span style="color:red;">0</span></span></div>
<div class="block-indent"><span class="monospaced">0 0 <span style="color:red;">1</span> 1 1 1 <span style="color:red;">0</span> 0 <span style="color:red;">1</span> 1 1 1 <span style="color:red;">0</span> 0 0 0</span></div>
<div class="block-indent"><span class="monospaced">0 0 0 0 <span style="color:red;">1</span> 1 1 1 1 <span style="color:red;">0</span> 0 <span style="color:red;">1</span> 1 1 <span style="color:red;">0</span> 0</span></div>
<div class="block-indent"><span class="monospaced"><span style="color:red;">0</span> 0 0 <span style="color:red;">1</span> 1 <span style="color:red;">0</span> 0 0 0 0 <span style="color:red;">1</span> 1 1 1 1 1</span></div>
<p>whereas a balanced 5-bit Gray code has a total of 32 transitions, which cannot be evenly distributed among the positions. In this example, four positions have six transitions each, and one has eight:<sup id="cite_ref-Bhat-Savage_1996_50-4" class="reference"><a href="#cite_note-Bhat-Savage_1996-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup>
</p>
<div class="block-indent"><span class="monospaced"><span style="color:red;">1</span> 1 1 1 1 <span style="color:red;">0</span> 0 0 0 <span style="color:red;">1</span> 1 1 1 1 1 <span style="color:red;">0</span> 0 <span style="color:red;">1</span> 1 1 1 1 <span style="color:red;">0</span> 0 0 0 0 0 0 0 0 0</span></div>
<div class="block-indent"><span class="monospaced">0 0 0 <span style="color:red;">1</span> 1 1 1 1 1 1 1 <span style="color:red;">0</span> 0 0 0 0 0 0 <span style="color:red;">1</span> 1 1 1 1 1 <span style="color:red;">0</span> 0 0 <span style="color:red;">1</span> 1 <span style="color:red;">0</span> 0 0</span></div>
<div class="block-indent"><span class="monospaced">1 1 <span style="color:red;">0</span> 0 <span style="color:red;">1</span> 1 1 <span style="color:red;">0</span> 0 0 0 0 0 <span style="color:red;">1</span> 1 1 <span style="color:red;">0</span> 0 0 <span style="color:red;">1</span> 1 1 1 1 1 <span style="color:red;">0</span> 0 0 0 0 <span style="color:red;">1</span> 1</span></div>
<div class="block-indent"><span class="monospaced">1 <span style="color:red;">0</span> 0 0 0 0 0 0 <span style="color:red;">1</span> 1 1 1 1 1 <span style="color:red;">0</span> 0 0 0 0 0 <span style="color:red;">1</span> 1 1 1 1 1 1 1 <span style="color:red;">0</span> 0 0 <span style="color:red;">1</span></span></div>
<div class="block-indent"><span class="monospaced">1 1 1 1 1 1 <span style="color:red;">0</span> 0 0 0 <span style="color:red;">1</span> 1 <span style="color:red;">0</span> 0 0 0 0 0 0 0 0 <span style="color:red;">1</span> 1 <span style="color:red;">0</span> 0 0 <span style="color:red;">1</span> 1 1 1 1 1</span></div>
<p>We will now show a construction<sup id="cite_ref-Flahive-Bose_2007_66-0" class="reference"><a href="#cite_note-Flahive-Bose_2007-66"><span class="cite-bracket">[</span>64<span class="cite-bracket">]</span></a></sup> and implementation<sup id="cite_ref-Strackx-Piessens_2016_67-0" class="reference"><a href="#cite_note-Strackx-Piessens_2016-67"><span class="cite-bracket">[</span>65<span class="cite-bracket">]</span></a></sup> for well-balanced binary Gray codes which allows us to generate an <i>n</i>-digit balanced Gray code for every <i>n</i>. The main principle is to inductively construct an (<i>n</i>&nbsp;+&nbsp;2)-digit Gray code <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle G'}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>G</mi>
<mo>′</mo>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle G'}</annotation>
</semantics>
</math></span><img src="./76634fad5818a777669a77cd8c86d1d816e4c402.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.511ex; height:2.509ex;" alt="{\displaystyle G'}" loading="lazy"></span> given an <i>n</i>-digit Gray code <i>G</i> in such a way that the balanced property is preserved. To do this, we consider partitions of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle G=g_{0},\ldots ,g_{2^{n}-1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>G</mi>
<mo>=</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle G=g_{0},\ldots ,g_{2^{n}-1}}</annotation>
</semantics>
</math></span><img src="./6b411434885fcbb73ab0f3e1aa185b39ae830f43.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.495ex; height:2.676ex;" alt="{\displaystyle G=g_{0},\ldots ,g_{2^{n}-1}}" loading="lazy"></span> into an even number <i>L</i> of non-empty blocks of the form
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left\{g_{0}\right\},\left\{g_{1},\ldots ,g_{k_{2}}\right\},\left\{g_{k_{2}+1},\ldots ,g_{k_{3}}\right\},\ldots ,\left\{g_{k_{L-2}+1},\ldots ,g_{-2}\right\},\left\{g_{-1}\right\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow>
<mo>{</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>}</mo>
</mrow>
<mo>,</mo>
<mrow>
<mo>{</mo>
<mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mrow>
</msub>
</mrow>
<mo>}</mo>
</mrow>
<mo>,</mo>
<mrow>
<mo>{</mo>
<mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
</msub>
</mrow>
<mo>}</mo>
</mrow>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow>
<mo>{</mo>
<mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>2</mn>
</mrow>
</msub>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>2</mn>
</mrow>
</msub>
</mrow>
<mo>}</mo>
</mrow>
<mo>,</mo>
<mrow>
<mo>{</mo>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
<mo>}</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \left\{g_{0}\right\},\left\{g_{1},\ldots ,g_{k_{2}}\right\},\left\{g_{k_{2}+1},\ldots ,g_{k_{3}}\right\},\ldots ,\left\{g_{k_{L-2}+1},\ldots ,g_{-2}\right\},\left\{g_{-1}\right\}}</annotation>
</semantics>
</math></span></span>
</p><p>where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k_{1}=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k_{1}=0}</annotation>
</semantics>
</math></span><img src="./484a4883bb85f16fbeb4390c60e856b343676dbd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.526ex; height:2.509ex;" alt="{\displaystyle k_{1}=0}" loading="lazy"></span>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k_{L-1}=-2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>L</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k_{L-1}=-2}</annotation>
</semantics>
</math></span><img src="./4d742d38d1c44bb5e44cbee7a36cbbb903ea91d5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:10.732ex; height:2.509ex;" alt="{\displaystyle k_{L-1}=-2}" loading="lazy"></span>, and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k_{L}\equiv -1{\pmod {2^{n}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>L</mi>
</mrow>
</msub>
<mo>≡<!-- ≡ --></mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k_{L}\equiv -1{\pmod {2^{n}}}}</annotation>
</semantics>
</math></span><img src="./68bbc982fbabbce6e1e134a66f745e4da7fd92d2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:20.697ex; height:2.843ex;" alt="{\displaystyle k_{L}\equiv -1{\pmod {2^{n}}}}" loading="lazy"></span>). This partition induces an <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (n+2)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo>+</mo>
<mn>2</mn>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (n+2)}</annotation>
</semantics>
</math></span><img src="./0e2ab433e9091be024c0cfdab3e5a88652af02c9.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.207ex; height:2.843ex;" alt="{\displaystyle (n+2)}" loading="lazy"></span>-digit Gray code given by
</p>
<div class="block-indent"><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}&amp;{\mathtt {00}}g_{0},\\&amp;{\mathtt {00}}g_{1},\ldots ,{\mathtt {00}}g_{k_{2}},{\mathtt {01}}g_{k_{2}},\ldots ,{\mathtt {01}}g_{1},{\mathtt {11}}g_{1},\ldots ,{\mathtt {11}}g_{k_{2}},\\&amp;{\mathtt {11}}g_{k_{2}+1},\ldots ,{\mathtt {11}}g_{k_{3}},{\mathtt {01}}g_{k_{3}},\ldots ,{\mathtt {01}}g_{k_{2}+1},{\mathtt {00}}g_{k_{2}+1},\ldots ,{\mathtt {00}}g_{k_{3}},\ldots ,\\&amp;{\mathtt {00}}g_{-2},{\mathtt {00}}g_{-1},{\mathtt {10}}g_{-1},{\mathtt {10}}g_{-2},\ldots ,{\mathtt {10}}g_{0},{\mathtt {11}}g_{0},{\mathtt {11}}g_{-1},{\mathtt {01}}g_{-1},{\mathtt {01}}g_{0}\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd></mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">00</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">00</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">00</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">01</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">01</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">11</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">11</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mrow>
</msub>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">11</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">11</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">01</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">01</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">00</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">00</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">00</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>2</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">00</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">10</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">10</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>2</mn>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">10</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">11</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">11</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">01</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">01</mn>
</mrow>
</mrow>
<msub>
<mi>g</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}&amp;{\mathtt {00}}g_{0},\\&amp;{\mathtt {00}}g_{1},\ldots ,{\mathtt {00}}g_{k_{2}},{\mathtt {01}}g_{k_{2}},\ldots ,{\mathtt {01}}g_{1},{\mathtt {11}}g_{1},\ldots ,{\mathtt {11}}g_{k_{2}},\\&amp;{\mathtt {11}}g_{k_{2}+1},\ldots ,{\mathtt {11}}g_{k_{3}},{\mathtt {01}}g_{k_{3}},\ldots ,{\mathtt {01}}g_{k_{2}+1},{\mathtt {00}}g_{k_{2}+1},\ldots ,{\mathtt {00}}g_{k_{3}},\ldots ,\\&amp;{\mathtt {00}}g_{-2},{\mathtt {00}}g_{-1},{\mathtt {10}}g_{-1},{\mathtt {10}}g_{-2},\ldots ,{\mathtt {10}}g_{0},{\mathtt {11}}g_{0},{\mathtt {11}}g_{-1},{\mathtt {01}}g_{-1},{\mathtt {01}}g_{0}\end{aligned}}}</annotation>
</semantics>
</math></span></span></div>
<p>If we define the <i>transition multiplicities</i>
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m_{i}=\left|\left\{j:\delta _{k_{j}}=i,1\leq j\leq L\right\}\right|}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>m</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>=</mo>
<mrow>
<mo>|</mo>
<mrow>
<mo>{</mo>
<mrow>
<mi>j</mi>
<mo>:</mo>
<msub>
<mi>δ<!-- δ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>k</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
</mrow>
</msub>
</mrow>
</msub>
<mo>=</mo>
<mi>i</mi>
<mo>,</mo>
<mn>1</mn>
<mo>≤<!-- ≤ --></mo>
<mi>j</mi>
<mo>≤<!-- ≤ --></mo>
<mi>L</mi>
</mrow>
<mo>}</mo>
</mrow>
<mo>|</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m_{i}=\left|\left\{j:\delta _{k_{j}}=i,1\leq j\leq L\right\}\right|}</annotation>
</semantics>
</math></span></span>
</p><p>to be the number of times the digit in position <i>i</i> changes between consecutive blocks in a partition, then for the (<i>n</i>&nbsp;+&nbsp;2)-digit Gray code induced by this partition the transition spectrum <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda '_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>λ<!-- λ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
<mo>′</mo>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda '_{i}}</annotation>
</semantics>
</math></span><img src="./399e755010f10e78180554793999069332c0fecb.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.155ex; height:2.843ex;" alt="{\displaystyle \lambda '_{i}}" loading="lazy"></span> is
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda '_{i}={\begin{cases}4\lambda _{i}-2m_{i},&amp;{\text{if }}0\leq i<n\\L,&amp;{\text{ otherwise }}\end{cases}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>λ<!-- λ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
<mo>′</mo>
</msubsup>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable columnalign="left left" rowspacing=".2em" columnspacing="1em" displaystyle="false">
<mtr>
<mtd>
<mn>4</mn>
<msub>
<mi>λ<!-- λ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>−<!-- − --></mo>
<mn>2</mn>
<msub>
<mi>m</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>,</mo>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>if&nbsp;</mtext>
</mrow>
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<mi>i</mi>
<mo>&lt;</mo>
<mi>n</mi>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>L</mi>
<mo>,</mo>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;otherwise&nbsp;</mtext>
</mrow>
</mtd>
</mtr>
</mtable>
<mo fence="true" stretchy="true" symmetric="true"></mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda '_{i}={\begin{cases}4\lambda _{i}-2m_{i},&amp;{\text{if }}0\leq i&lt;n\\L,&amp;{\text{ otherwise }}\end{cases}}}</annotation>
</semantics>
</math></span></span>
</p><p>The delicate part of this construction is to find an adequate partitioning of a balanced <i>n</i>-digit Gray code such that the code induced by it remains balanced, but for this only the transition multiplicities matter; joining two consecutive blocks over a digit <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span> transition and splitting another block at another digit <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span> transition produces a different Gray code with exactly the same transition spectrum <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda '_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>λ<!-- λ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
<mo>′</mo>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda '_{i}}</annotation>
</semantics>
</math></span><img src="./399e755010f10e78180554793999069332c0fecb.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.155ex; height:2.843ex;" alt="{\displaystyle \lambda '_{i}}" loading="lazy"></span>, so one may for example<sup id="cite_ref-Suparta_2005_65-1" class="reference"><a href="#cite_note-Suparta_2005-65"><span class="cite-bracket">[</span>63<span class="cite-bracket">]</span></a></sup> designate the first <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle m_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>m</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle m_{i}}</annotation>
</semantics>
</math></span><img src="./95ec8e804f69706d3f5ad235f4f983220c8df7c2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.84ex; height:2.009ex;" alt="{\displaystyle m_{i}}" loading="lazy"></span> transitions at digit <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span> as those that fall between two blocks. Uniform codes can be found when <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle R\equiv 0{\pmod {4}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>R</mi>
<mo>≡<!-- ≡ --></mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mn>4</mn>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle R\equiv 0{\pmod {4}}}</annotation>
</semantics>
</math></span><img src="./c63aba62d3306064c95d61f966692e8728fce67a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.871ex; height:2.843ex;" alt="{\displaystyle R\equiv 0{\pmod {4}}}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle R^{n}\equiv 0{\pmod {n}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>R</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mo>≡<!-- ≡ --></mo>
<mn>0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle R^{n}\equiv 0{\pmod {n}}}</annotation>
</semantics>
</math></span><img src="./94f7b37089fbe2ecdce794fb8e8d8f8427f7b27e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.322ex; height:2.843ex;" alt="{\displaystyle R^{n}\equiv 0{\pmod {n}}}" loading="lazy"></span>, and this construction can be extended to the <i>R</i>-ary case as well.<sup id="cite_ref-Flahive-Bose_2007_66-1" class="reference"><a href="#cite_note-Flahive-Bose_2007-66"><span class="cite-bracket">[</span>64<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Long_run_Gray_codes">Long run Gray codes</h3></div>
<p>Long run (or <i>maximum gap</i>) Gray codes maximize the distance between consecutive changes of digits in the same position. That is, the minimum run-length of any bit remains unchanged for as long as possible.<sup id="cite_ref-68" class="reference"><a href="#cite_note-68"><span class="cite-bracket">[</span>66<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Monotonic_Gray_codes">Monotonic Gray codes</h3></div>
<p>Monotonic codes are useful in the theory of interconnection networks, especially for minimizing dilation for linear arrays of processors.<sup id="cite_ref-Savage-Winkler_1995_69-0" class="reference"><a href="#cite_note-Savage-Winkler_1995-69"><span class="cite-bracket">[</span>67<span class="cite-bracket">]</span></a></sup>
If we define the <i>weight</i> of a binary string to be the number of 1s in the string, then although we clearly cannot have a Gray code with strictly increasing weight, we may want to approximate this by having the code run through two adjacent weights before reaching the next one.
</p><p>We can formalize the concept of monotone Gray codes as follows: consider the partition of the hypercube <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q_{n}=(V_{n},E_{n})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>=</mo>
<mo stretchy="false">(</mo>
<msub>
<mi>V</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q_{n}=(V_{n},E_{n})}</annotation>
</semantics>
</math></span><img src="./72223d943d961230ad7eb196ee1e2b33f78cd9c5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:14.506ex; height:2.843ex;" alt="{\displaystyle Q_{n}=(V_{n},E_{n})}" loading="lazy"></span> into <i>levels</i> of vertices that have equal weight, i.e.
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle V_{n}(i)=\{v\in V_{n}:v{\text{ has weight }}i\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>V</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mo fence="false" stretchy="false">{</mo>
<mi>v</mi>
<mo>∈<!-- ∈ --></mo>
<msub>
<mi>V</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>:</mo>
<mi>v</mi>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;has weight&nbsp;</mtext>
</mrow>
<mi>i</mi>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle V_{n}(i)=\{v\in V_{n}:v{\text{ has weight }}i\}}</annotation>
</semantics>
</math></span></span>
</p><p>for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0\leq i\leq n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<mi>i</mi>
<mo>≤<!-- ≤ --></mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0\leq i\leq n}</annotation>
</semantics>
</math></span><img src="./db879b8b15adbedaf379f6f5c5bceab41e47052b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:9.557ex; height:2.343ex;" alt="{\displaystyle 0\leq i\leq n}" loading="lazy"></span>. These levels satisfy <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle |V_{n}(i)|=\textstyle {\binom {n}{i}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<msub>
<mi>V</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">|</mo>
</mrow>
<mo>=</mo>
<mstyle displaystyle="false" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mrow class="MJX-TeXAtom-OPEN">
<mo maxsize="1.2em" minsize="1.2em">(</mo>
</mrow>
<mfrac linethickness="0">
<mi>n</mi>
<mi>i</mi>
</mfrac>
<mrow class="MJX-TeXAtom-CLOSE">
<mo maxsize="1.2em" minsize="1.2em">)</mo>
</mrow>
</mrow>
</mrow>
</mstyle>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle |V_{n}(i)|=\textstyle {\binom {n}{i}}}</annotation>
</semantics>
</math></span><img src="./9a58334d8b7a15cbe890a373199cde27b5d02eb7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:12.694ex; height:3.176ex;" alt="{\displaystyle |V_{n}(i)|=\textstyle {\binom {n}{i}}}" loading="lazy"></span>. Let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q_{n}(i)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q_{n}(i)}</annotation>
</semantics>
</math></span><img src="./0f9f3f8876448a83539cde67c11d83c7b1a6ef27.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.669ex; height:2.843ex;" alt="{\displaystyle Q_{n}(i)}" loading="lazy"></span> be the subgraph of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q_{n}}</annotation>
</semantics>
</math></span><img src="./503d0af3998f76cd4eaf8b3cc5e8834e254cb71b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.057ex; height:2.509ex;" alt="{\displaystyle Q_{n}}" loading="lazy"></span> induced by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle V_{n}(i)\cup V_{n}(i+1)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>V</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
<mo>∪<!-- ∪ --></mo>
<msub>
<mi>V</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo>+</mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle V_{n}(i)\cup V_{n}(i+1)}</annotation>
</semantics>
</math></span><img src="./a032c17537b87d031e8e7954f029059c022c5735.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:16.956ex; height:2.843ex;" alt="{\displaystyle V_{n}(i)\cup V_{n}(i+1)}" loading="lazy"></span>, and let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle E_{n}(i)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle E_{n}(i)}</annotation>
</semantics>
</math></span><img src="./5501d97be9251ce0929b660c17ccc41cea5666d1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.545ex; height:2.843ex;" alt="{\displaystyle E_{n}(i)}" loading="lazy"></span> be the edges in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q_{n}(i)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q_{n}(i)}</annotation>
</semantics>
</math></span><img src="./0f9f3f8876448a83539cde67c11d83c7b1a6ef27.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.669ex; height:2.843ex;" alt="{\displaystyle Q_{n}(i)}" loading="lazy"></span>. A monotonic Gray code is then a Hamiltonian path in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q_{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q_{n}}</annotation>
</semantics>
</math></span><img src="./503d0af3998f76cd4eaf8b3cc5e8834e254cb71b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.057ex; height:2.509ex;" alt="{\displaystyle Q_{n}}" loading="lazy"></span> such that whenever <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \delta _{1}\in E_{n}(i)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>δ<!-- δ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>∈<!-- ∈ --></mo>
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>i</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \delta _{1}\in E_{n}(i)}</annotation>
</semantics>
</math></span><img src="./489d9a34489f0ff38bc75dfec9b85fb445bb33a3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.473ex; height:2.843ex;" alt="{\displaystyle \delta _{1}\in E_{n}(i)}" loading="lazy"></span> comes before <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \delta _{2}\in E_{n}(j)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>δ<!-- δ --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>∈<!-- ∈ --></mo>
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>j</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \delta _{2}\in E_{n}(j)}</annotation>
</semantics>
</math></span><img src="./68fa40487a932cccf66b583eb47d60b1b2981bd5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.628ex; height:2.843ex;" alt="{\displaystyle \delta _{2}\in E_{n}(j)}" loading="lazy"></span> in the path, then <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i\leq j}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
<mo>≤<!-- ≤ --></mo>
<mi>j</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i\leq j}</annotation>
</semantics>
</math></span><img src="./894ab6e9c9afcfea7d9370399cebe1557bdf9b2e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:4.859ex; height:2.509ex;" alt="{\displaystyle i\leq j}" loading="lazy"></span>.
</p><p>An elegant construction of monotonic <i>n</i>-digit Gray codes for any <i>n</i> is based on the idea of recursively building subpaths <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{n,j}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mi>j</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{n,j}}</annotation>
</semantics>
</math></span><img src="./9418c2367bab185d81c3fcc4684af643376ee588.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:3.846ex; height:2.843ex;" alt="{\displaystyle P_{n,j}}" loading="lazy"></span> of length <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2\textstyle {\binom {n}{j}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>2</mn>
<mstyle displaystyle="false" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mrow class="MJX-TeXAtom-OPEN">
<mo maxsize="1.2em" minsize="1.2em">(</mo>
</mrow>
<mfrac linethickness="0">
<mi>n</mi>
<mi>j</mi>
</mfrac>
<mrow class="MJX-TeXAtom-CLOSE">
<mo maxsize="1.2em" minsize="1.2em">)</mo>
</mrow>
</mrow>
</mrow>
</mstyle>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2\textstyle {\binom {n}{j}}}</annotation>
</semantics>
</math></span><img src="./9cd5a01a5d0d718084e92cca95a7cfbd27cc57b3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.338ex; width:4.278ex; height:3.509ex;" alt="{\displaystyle 2\textstyle {\binom {n}{j}}}" loading="lazy"></span> having edges in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle E_{n}(j)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>j</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle E_{n}(j)}</annotation>
</semantics>
</math></span><img src="./13230c15a8aa88268efa6cc75bb335c7349eb2e6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.701ex; height:2.843ex;" alt="{\displaystyle E_{n}(j)}" loading="lazy"></span>.<sup id="cite_ref-Savage-Winkler_1995_69-1" class="reference"><a href="#cite_note-Savage-Winkler_1995-69"><span class="cite-bracket">[</span>67<span class="cite-bracket">]</span></a></sup> We define <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{1,0}=({\mathtt {0}},{\mathtt {1}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
<mo>,</mo>
<mn>0</mn>
</mrow>
</msub>
<mo>=</mo>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">0</mn>
</mrow>
</mrow>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">1</mn>
</mrow>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{1,0}=({\mathtt {0}},{\mathtt {1}})}</annotation>
</semantics>
</math></span><img src="./3cdffab79f9de7152195854ab2e3d460717082e6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:12.209ex; height:3.009ex;" alt="{\displaystyle P_{1,0}=({\mathtt {0}},{\mathtt {1}})}" loading="lazy"></span>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{n,j}=\emptyset }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mi>j</mi>
</mrow>
</msub>
<mo>=</mo>
<mi mathvariant="normal">∅<!-- ∅ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{n,j}=\emptyset }</annotation>
</semantics>
</math></span><img src="./73912c0dbffd0a710e1028f2330d7d0b3e7abc30.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:8.106ex; height:3.009ex;" alt="{\displaystyle P_{n,j}=\emptyset }" loading="lazy"></span> whenever <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle j<0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>j</mi>
<mo>&lt;</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle j&lt;0}</annotation>
</semantics>
</math></span><img src="./4d0376a7930145af9526ce827e761294989300ec.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.027ex; width:5.246ex; height:2.509ex;" alt="{\displaystyle j<0}" loading="lazy"></span> or <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle j\geq n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>j</mi>
<mo>≥<!-- ≥ --></mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle j\geq n}</annotation>
</semantics>
</math></span><img src="./7a8ea865b6197d310980d3279be2b66fc77de0d5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; margin-left: -0.027ex; width:5.478ex; height:2.509ex;" alt="{\displaystyle j\geq n}" loading="lazy"></span>, and
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{n+1,j}={\mathtt {1}}P_{n,j-1}^{\pi _{n}},{\mathtt {0}}P_{n,j}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>+</mo>
<mn>1</mn>
<mo>,</mo>
<mi>j</mi>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">1</mn>
</mrow>
</mrow>
<msubsup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mi>j</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mrow>
</msubsup>
<mo>,</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="monospace">0</mn>
</mrow>
</mrow>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mi>j</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{n+1,j}={\mathtt {1}}P_{n,j-1}^{\pi _{n}},{\mathtt {0}}P_{n,j}}</annotation>
</semantics>
</math></span></span>
</p><p>otherwise. Here, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi _{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \pi _{n}}</annotation>
</semantics>
</math></span><img src="./3e3144ebd68015a67d92ab797a63d232c65ead26.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.544ex; height:2.009ex;" alt="{\displaystyle \pi _{n}}" loading="lazy"></span> is a suitably defined permutation and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P^{\pi }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>π<!-- π --></mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P^{\pi }}</annotation>
</semantics>
</math></span><img src="./7fd0418643fa58f1e6b620f0190457c8634637ec.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.996ex; height:2.343ex;" alt="{\displaystyle P^{\pi }}" loading="lazy"></span> refers to the path <i>P</i> with its coordinates permuted by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>π<!-- π --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \pi }</annotation>
</semantics>
</math></span><img src="./9be4ba0bb8df3af72e90a0535fabcc17431e540a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.332ex; height:1.676ex;" alt="{\displaystyle \pi }" loading="lazy"></span>. These paths give rise to two monotonic <i>n</i>-digit Gray codes <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle G_{n}^{(1)}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>G</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle G_{n}^{(1)}}</annotation>
</semantics>
</math></span><img src="./9803fa34b39ef8a6a5e41c5c6ba3e55f90c73828.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:4.16ex; height:3.343ex;" alt="{\displaystyle G_{n}^{(1)}}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle G_{n}^{(2)}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>G</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<mn>2</mn>
<mo stretchy="false">)</mo>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle G_{n}^{(2)}}</annotation>
</semantics>
</math></span><img src="./16f2465e316b73a01ecda77afba7527c6c3cdb05.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:4.16ex; height:3.343ex;" alt="{\displaystyle G_{n}^{(2)}}" loading="lazy"></span> given by
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle G_{n}^{(1)}=P_{n,0}P_{n,1}^{R}P_{n,2}P_{n,3}^{R}\cdots {\text{ and }}G_{n}^{(2)}=P_{n,0}^{R}P_{n,1}P_{n,2}^{R}P_{n,3}\cdots }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>G</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
</mrow>
</msubsup>
<mo>=</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>0</mn>
</mrow>
</msub>
<msubsup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>R</mi>
</mrow>
</msubsup>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>2</mn>
</mrow>
</msub>
<msubsup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>3</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>R</mi>
</mrow>
</msubsup>
<mo>⋯<!-- ⋯ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mtext>&nbsp;and&nbsp;</mtext>
</mrow>
<msubsup>
<mi>G</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<mn>2</mn>
<mo stretchy="false">)</mo>
</mrow>
</msubsup>
<mo>=</mo>
<msubsup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>0</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>R</mi>
</mrow>
</msubsup>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>1</mn>
</mrow>
</msub>
<msubsup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>2</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>R</mi>
</mrow>
</msubsup>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mn>3</mn>
</mrow>
</msub>
<mo>⋯<!-- ⋯ --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle G_{n}^{(1)}=P_{n,0}P_{n,1}^{R}P_{n,2}P_{n,3}^{R}\cdots {\text{ and }}G_{n}^{(2)}=P_{n,0}^{R}P_{n,1}P_{n,2}^{R}P_{n,3}\cdots }</annotation>
</semantics>
</math></span></span>
</p><p>The choice of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi _{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \pi _{n}}</annotation>
</semantics>
</math></span><img src="./3e3144ebd68015a67d92ab797a63d232c65ead26.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.544ex; height:2.009ex;" alt="{\displaystyle \pi _{n}}" loading="lazy"></span> which ensures that these codes are indeed Gray codes turns out to be <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \pi _{n}=E^{-1}\left(\pi _{n-1}^{2}\right)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>=</mo>
<msup>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
<mrow>
<mo>(</mo>
<msubsup>
<mi>π<!-- π --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msubsup>
<mo>)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \pi _{n}=E^{-1}\left(\pi _{n-1}^{2}\right)}</annotation>
</semantics>
</math></span><img src="./624f534d305dab5b81e55d8a3b8e1c0b26747772.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:16.93ex; height:3.509ex;" alt="{\displaystyle \pi _{n}=E^{-1}\left(\pi _{n-1}^{2}\right)}" loading="lazy"></span>. The first few values of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{n,j}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mi>j</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{n,j}}</annotation>
</semantics>
</math></span><img src="./9418c2367bab185d81c3fcc4684af643376ee588.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:3.846ex; height:2.843ex;" alt="{\displaystyle P_{n,j}}" loading="lazy"></span> are shown in the table below.
</p>
<table class="wikitable floatright" style="text-align: center;">
<caption>Subpaths in the Savage–Winkler algorithm
</caption>
<tbody><tr>
<th scope="col"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{n,j}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>,</mo>
<mi>j</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{n,j}}</annotation>
</semantics>
</math></span><img src="./9418c2367bab185d81c3fcc4684af643376ee588.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:3.846ex; height:2.843ex;" alt="{\displaystyle P_{n,j}}" loading="lazy"></span>
</th>
<th scope="col"><i>j</i> = 0
</th>
<th scope="col"><i>j</i> = 1
</th>
<th scope="col"><i>j</i> = 2
</th>
<th scope="col"><i>j</i> = 3
</th></tr>
<tr>
<th scope="row"><i>n</i> = 1
</th>
<td><span class="monospaced">0, 1</span></td>
<td></td>
<td></td>
<td>
</td></tr>
<tr>
<th scope="row"><i>n</i> = 2
</th>
<td><span class="monospaced">00, 01</span></td>
<td><span class="monospaced">10, 11</span></td>
<td></td>
<td>
</td></tr>
<tr>
<th scope="row"><i>n</i> = 3
</th>
<td><span class="monospaced">000, 001</span></td>
<td><span class="monospaced">100, 110, 010, 011</span></td>
<td><span class="monospaced">101, 111</span></td>
<td>
</td></tr>
<tr>
<th scope="row"><i>n</i> = 4
</th>
<td><span class="monospaced">0000, 0001</span></td>
<td><span class="monospaced">1000, 1100, 0100, 0110, 0010, 0011</span></td>
<td><span class="monospaced">1010, 1011, 1001, 1101, 0101, 0111</span></td>
<td><span class="monospaced">1110, 1111</span>
</td></tr></tbody></table>
<p>These monotonic Gray codes can be efficiently implemented in such a way that each subsequent element can be generated in <i>O</i>(<i>n</i>) time. The algorithm is most easily described using <a href="Coroutine" title="Coroutine">coroutines</a>.
</p><p>Monotonic codes have an interesting connection to the <a href="Lov%C3%A1sz_conjecture" title="Lovász conjecture">Lovász conjecture</a>, which states that every connected <a href="Vertex-transitive_graph" title="Vertex-transitive graph">vertex-transitive graph</a> contains a Hamiltonian path. The "middle-level" subgraph <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q_{2n+1}(n)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
<mi>n</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q_{2n+1}(n)}</annotation>
</semantics>
</math></span><img src="./203b83700c359dc087c1d8adf9fb5095807f0cbd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:9.183ex; height:2.843ex;" alt="{\displaystyle Q_{2n+1}(n)}" loading="lazy"></span> is <a href="Vertex-transitive_graph" title="Vertex-transitive graph">vertex-transitive</a> (that is, its automorphism group is transitive, so that each vertex has the same "local environment" and cannot be differentiated from the others, since we can relabel the coordinates as well as the binary digits to obtain an <a href="Automorphism" title="Automorphism">automorphism</a>) and the problem of finding a Hamiltonian path in this subgraph is called the "middle-levels problem", which can provide insights into the more general conjecture. The question has been answered affirmatively for <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\leq 15}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
<mo>≤<!-- ≤ --></mo>
<mn>15</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n\leq 15}</annotation>
</semantics>
</math></span><img src="./7ed4c441dc5b93ff4291211708495400531f7d98.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.818ex; height:2.343ex;" alt="{\displaystyle n\leq 15}" loading="lazy"></span>, and the preceding construction for monotonic codes ensures a Hamiltonian path of length at least 0.839<span style="visibility:hidden; color:transparent; padding-left:2px">‍</span><i>N</i>, where <i>N</i> is the number of vertices in the middle-level subgraph.<sup id="cite_ref-Savage_1997_70-0" class="reference"><a href="#cite_note-Savage_1997-70"><span class="cite-bracket">[</span>68<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Beckett–Gray_code">Beckett–Gray code</h3></div>
<p>Another type of Gray code, the <b>Beckett–Gray code</b>, is named for Irish playwright <a href="Samuel_Beckett" title="Samuel Beckett">Samuel Beckett</a>, who was interested in <a href="Symmetry" title="Symmetry">symmetry</a>. His play "<a href="Quad_(play)" title="Quad (play)">Quad</a>" features four actors and is divided into sixteen time periods. Each period ends with one of the four actors entering or leaving the stage. The play begins and ends with an empty stage, and Beckett wanted each subset of actors to appear on stage exactly once.<sup id="cite_ref-Goddyn_1999_71-0" class="reference"><a href="#cite_note-Goddyn_1999-71"><span class="cite-bracket">[</span>69<span class="cite-bracket">]</span></a></sup> Clearly the set of actors currently on stage can be represented by a 4-bit binary Gray code. Beckett, however, placed an additional restriction on the script: he wished the actors to enter and exit so that the actor who had been on stage the longest would always be the one to exit. The actors could then be represented by a <a href="FIFO_(computing_and_electronics)" title="FIFO (computing and electronics)">first in, first out</a> <a href="Queue_(data_structure)" class="mw-redirect" title="Queue (data structure)">queue</a>, so that (of the actors onstage) the actor being dequeued is always the one who was enqueued first.<sup id="cite_ref-Goddyn_1999_71-1" class="reference"><a href="#cite_note-Goddyn_1999-71"><span class="cite-bracket">[</span>69<span class="cite-bracket">]</span></a></sup> Beckett was unable to find a Beckett–Gray code for his play, and indeed, an exhaustive listing of all possible sequences reveals that no such code exists for <i>n</i> = 4. It is known today that such codes do exist for <i>n</i> = 2, 5, 6, 7, and 8, and do not exist for <i>n</i> = 3 or 4. An example of an 8-bit Beckett–Gray code can be found in <a href="Donald_Knuth" title="Donald Knuth">Donald Knuth</a>'s <i>Art of Computer Programming</i>.<sup id="cite_ref-Knuth_2014_11-8" class="reference"><a href="#cite_note-Knuth_2014-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> According to Sawada and Wong, the search space for <i>n</i> = 6 can be explored in 15 hours, and more than <span class="nowrap">9500</span> solutions for the case <i>n</i> = 7 have been found.<sup id="cite_ref-Sawada-Wong_2007_72-0" class="reference"><a href="#cite_note-Sawada-Wong_2007-72"><span class="cite-bracket">[</span>70<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Snake-in-the-box_codes">Snake-in-the-box codes </h3></div>

<p><a href="Snake-in-the-box" title="Snake-in-the-box">Snake-in-the-box</a> codes, or <i>snakes</i>, are the sequences of nodes of <a href="Induced_path" title="Induced path">induced paths</a> in an <i>n</i>-dimensional <a href="Hypercube_graph" title="Hypercube graph">hypercube graph</a>, and coil-in-the-box codes,<sup id="cite_ref-Richards_1971_73-0" class="reference"><a href="#cite_note-Richards_1971-73"><span class="cite-bracket">[</span>71<span class="cite-bracket">]</span></a></sup> or <i>coils</i>, are the sequences of nodes of induced <a href="Cycle_(graph_theory)" title="Cycle (graph theory)">cycles</a> in a hypercube. Viewed as Gray codes, these sequences have the property of being able to detect any single-bit coding error. Codes of this type were first described by <a href="William_H._Kautz" class="mw-redirect" title="William H. Kautz">William H. Kautz</a> in the late 1950s;<sup id="cite_ref-Kautz_1958_3-1" class="reference"><a href="#cite_note-Kautz_1958-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> since then, there has been much research on finding the code with the largest possible number of codewords for a given hypercube dimension.
</p>
<div class="mw-heading mw-heading3"><h3 id="Single-track_Gray_code">Single-track Gray code </h3></div>
<p>Yet another kind of Gray code is the <b>single-track Gray code</b> (STGC) developed by Norman B. Spedding<sup id="cite_ref-Spedding_1994_1_74-0" class="reference"><a href="#cite_note-Spedding_1994_1-74"><span class="cite-bracket">[</span>72<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Spedding_1994_2_75-0" class="reference"><a href="#cite_note-Spedding_1994_2-75"><span class="cite-bracket">[</span>73<span class="cite-bracket">]</span></a></sup> and refined by Hiltgen, Paterson and Brandestini in <i>Single-track Gray Codes</i> (1996).<sup id="cite_ref-Hiltgen-Paterson-Brandestini_1996_76-0" class="reference"><a href="#cite_note-Hiltgen-Paterson-Brandestini_1996-76"><span class="cite-bracket">[</span>74<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hiltgen-Paterson_2001_77-0" class="reference"><a href="#cite_note-Hiltgen-Paterson_2001-77"><span class="cite-bracket">[</span>75<span class="cite-bracket">]</span></a></sup> The STGC is a cyclical list of <i>P</i> unique binary encodings of length n such that two consecutive words differ in exactly one position, and when the list is examined as a <i>P</i>&nbsp;×&nbsp;<i>n</i> <a href="Matrix_(mathematics)" title="Matrix (mathematics)">matrix</a>, each column is a cyclic shift of the first column.<sup id="cite_ref-Etzion-Schwartz_1999_78-0" class="reference"><a href="#cite_note-Etzion-Schwartz_1999-78"><span class="cite-bracket">[</span>76<span class="cite-bracket">]</span></a></sup>
</p>

<p>The name comes from their use with <a href="Rotary_encoder" title="Rotary encoder">rotary encoders</a>, where a number of tracks are being sensed by contacts, resulting for each in an output of <span class="monospaced">0</span> or <span class="monospaced">1</span>. To reduce noise due to different contacts not switching at exactly the same moment in time, one preferably sets up the tracks so that the data output by the contacts are in Gray code. To get high angular accuracy, one needs lots of contacts; in order to achieve at least 1° accuracy, one needs at least 360 distinct positions per revolution, which requires a minimum of 9 bits of data, and thus the same number of contacts.
</p><p>If all contacts are placed at the same angular position, then 9 tracks are needed to get a standard BRGC with at least 1° accuracy. However, if the manufacturer moves a contact to a different angular position (but at the same distance from the center shaft), then the corresponding "ring pattern" needs to be rotated the same angle to give the same output. If the most significant bit (the inner ring in Figure 1) is rotated enough, it exactly matches the next ring out. Since both rings are then identical, the inner ring can be cut out, and the sensor for that ring moved to the remaining, identical ring (but offset at that angle from the other sensor on that ring). Those two sensors on a single ring make a quadrature encoder. That reduces the number of tracks for a "1° resolution" angular encoder to 8 tracks. Reducing the number of tracks still further cannot be done with BRGC.
</p><p>For many years, Torsten Sillke<sup id="cite_ref-Sillke_1997_79-0" class="reference"><a href="#cite_note-Sillke_1997-79"><span class="cite-bracket">[</span>77<span class="cite-bracket">]</span></a></sup> and other mathematicians believed that it was impossible to encode position on a single track such that consecutive positions differed at only a single sensor, except for the 2-sensor, 1-track quadrature encoder. So for applications where 8 tracks were too bulky, people used single-track incremental encoders (quadrature encoders) or 2-track "quadrature encoder + reference notch" encoders.
</p><p>Norman B. Spedding, however, registered a patent in 1994 with several examples showing that it was possible.<sup id="cite_ref-Spedding_1994_1_74-1" class="reference"><a href="#cite_note-Spedding_1994_1-74"><span class="cite-bracket">[</span>72<span class="cite-bracket">]</span></a></sup> Although it is not possible to distinguish 2<sup><i>n</i></sup> positions with <i>n</i> sensors on a single track, it <i>is</i> possible to distinguish close to that many. Etzion and Paterson conjecture that when <i>n</i> is itself a power of 2, <i>n</i> sensors can distinguish at most 2<sup><i>n</i></sup>&nbsp;−&nbsp;2<i>n</i> positions and that for prime <i>n</i> the limit is 2<sup><i>n</i></sup>&nbsp;−&nbsp;2 positions.<sup id="cite_ref-Etzion-Paterson_1996_80-0" class="reference"><a href="#cite_note-Etzion-Paterson_1996-80"><span class="cite-bracket">[</span>78<span class="cite-bracket">]</span></a></sup> The authors went on to generate a 504-position single track code of length 9 which they believe is optimal. Since this number is larger than 2<sup>8</sup> = 256, more than 8 sensors are required by any code, although a BRGC could distinguish 512 positions with 9 sensors.
</p><p>An STGC for <i>P</i>&nbsp;=&nbsp;30 and <i>n</i>&nbsp;=&nbsp;5 is reproduced here:
</p>
<table class="wikitable" style="text-align:center; background:#FFFFFF; border-width:0;">
<caption>Single-track Gray code for 30 positions
</caption>
<tbody><tr>
<th>Angle</th>
<th>Code
</th>
<td rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th></tr>
<tr>
<td>0°</td>
<td><span class="monospaced">10000</span></td>
<td>72°</td>
<td><span class="monospaced">01000</span></td>
<td>144°</td>
<td><span class="monospaced">00100</span></td>
<td>216°</td>
<td><span class="monospaced">00010</span></td>
<td>288°</td>
<td><span class="monospaced">00001</span>
</td></tr>
<tr>
<td>12°</td>
<td><span class="monospaced">10100</span></td>
<td>84°</td>
<td><span class="monospaced">01010</span></td>
<td>156°</td>
<td><span class="monospaced">00101</span></td>
<td>228°</td>
<td><span class="monospaced">10010</span></td>
<td>300°</td>
<td><span class="monospaced">01001</span>
</td></tr>
<tr>
<td>24°</td>
<td><span class="monospaced">11100</span></td>
<td>96°</td>
<td><span class="monospaced">01110</span></td>
<td>168°</td>
<td><span class="monospaced">00111</span></td>
<td>240°</td>
<td><span class="monospaced">10011</span></td>
<td>312°</td>
<td><span class="monospaced">11001</span>
</td></tr>
<tr>
<td>36°</td>
<td><span class="monospaced">11110</span></td>
<td>108°</td>
<td><span class="monospaced">01111</span></td>
<td>180°</td>
<td><span class="monospaced">10111</span></td>
<td>252°</td>
<td><span class="monospaced">11011</span></td>
<td>324°</td>
<td><span class="monospaced">11101</span>
</td></tr>
<tr>
<td>48°</td>
<td><span class="monospaced">11010</span></td>
<td>120°</td>
<td><span class="monospaced">01101</span></td>
<td>192°</td>
<td><span class="monospaced">10110</span></td>
<td>264°</td>
<td><span class="monospaced">01011</span></td>
<td>336°</td>
<td><span class="monospaced">10101</span>
</td></tr>
<tr>
<td>60°</td>
<td><span class="monospaced">11000</span></td>
<td>132°</td>
<td><span class="monospaced">01100</span></td>
<td>204°</td>
<td><span class="monospaced">00110</span></td>
<td>276°</td>
<td><span class="monospaced">00011</span></td>
<td>348°</td>
<td><span class="monospaced">10001</span>
</td></tr></tbody></table>
<p>Each column is a cyclic shift of the first column, and from any row to the next row only one bit changes.<sup id="cite_ref-Ruskey_2005_81-0" class="reference"><a href="#cite_note-Ruskey_2005-81"><span class="cite-bracket">[</span>79<span class="cite-bracket">]</span></a></sup>
The single-track nature (like a code chain) is useful in the fabrication of these wheels (compared to BRGC), as only one track is needed, thus reducing their cost and size.
The Gray code nature is useful (compared to <a href="Chain_code" title="Chain code">chain codes</a>, also called <a href="De_Bruijn_sequence" title="De Bruijn sequence">De Bruijn sequences</a>), as only one sensor will change at any one time, so the uncertainty during a transition between two discrete states will only be plus or minus one unit of angular measurement the device is capable of resolving.<sup id="cite_ref-Alciatore-Histand_1999_82-0" class="reference"><a href="#cite_note-Alciatore-Histand_1999-82"><span class="cite-bracket">[</span>80<span class="cite-bracket">]</span></a></sup>
</p>

<p>Since this 30 degree example was added, there has been a lot of interest in examples with higher angular resolution. In 2008, Gary Williams,<sup id="cite_ref-Experts_Exchange_Williams_2008_83-0" class="reference"><a href="#cite_note-Experts_Exchange_Williams_2008-83"><span class="cite-bracket">[</span>81<span class="cite-bracket">]</span></a></sup> based on previous work,<sup id="cite_ref-Etzion-Paterson_1996_80-1" class="reference"><a href="#cite_note-Etzion-Paterson_1996-80"><span class="cite-bracket">[</span>78<span class="cite-bracket">]</span></a></sup> discovered a 9-bit single track Gray code that gives a 1 degree resolution. This Gray code was used to design an actual device which was published on the site <a href="Thingiverse" title="Thingiverse">Thingiverse</a>. This device<sup id="cite_ref-Thingiverse_9-Bit_Singletrack_Gray_Code_Rotorary_Encoder_84-0" class="reference"><a href="#cite_note-Thingiverse_9-Bit_Singletrack_Gray_Code_Rotorary_Encoder-84"><span class="cite-bracket">[</span>82<span class="cite-bracket">]</span></a></sup> was designed by etzenseep (Florian Bauer) in September 2022.
</p><p>An STGC for <i>P</i>&nbsp;=&nbsp;360 and <i>n</i>&nbsp;=&nbsp;9 is reproduced here:
</p>
<table class="wikitable" style="text-align:center; background:#FFFFFF; border-width:0;">
<caption>Single-track Gray code for 360 positions
</caption>
<tbody><tr>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td>
<th>Angle</th>
<th>Code
</th>
<td rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;">
</td></tr>
<tr>
<td>0°</td>
<td><span class="monospaced">100000001</span>
</td>
<td>40°</td>
<td><span class="monospaced">000000011</span>
</td>
<td>80°</td>
<td><span class="monospaced">000000110</span>
</td>
<td>120°</td>
<td><span class="monospaced">000001100</span>
</td>
<td>160°</td>
<td><span class="monospaced">000011000</span>
</td>
<td>200°</td>
<td><span class="monospaced">000110000</span>
</td>
<td>240°</td>
<td><span class="monospaced">001100000</span>
</td>
<td>280°</td>
<td><span class="monospaced">011000000</span>
</td>
<td>320°</td>
<td><span class="monospaced">110000000</span>
</td></tr>
<tr>
<td>1°</td>
<td><span class="monospaced">110000001</span>
</td>
<td>41°</td>
<td><span class="monospaced">100000011</span>
</td>
<td>81°</td>
<td><span class="monospaced">000000111</span>
</td>
<td>121°</td>
<td><span class="monospaced">000001110</span>
</td>
<td>161°</td>
<td><span class="monospaced">000011100</span>
</td>
<td>201°</td>
<td><span class="monospaced">000111000</span>
</td>
<td>241°</td>
<td><span class="monospaced">001110000</span>
</td>
<td>281°</td>
<td><span class="monospaced">011100000</span>
</td>
<td>321°</td>
<td><span class="monospaced">111000000</span>
</td></tr>
<tr>
<td>2°</td>
<td><span class="monospaced">111000001</span>
</td>
<td>42°</td>
<td><span class="monospaced">110000011</span>
</td>
<td>82°</td>
<td><span class="monospaced">100000111</span>
</td>
<td>122°</td>
<td><span class="monospaced">000001111</span>
</td>
<td>162°</td>
<td><span class="monospaced">000011110</span>
</td>
<td>202°</td>
<td><span class="monospaced">000111100</span>
</td>
<td>242°</td>
<td><span class="monospaced">001111000</span>
</td>
<td>282°</td>
<td><span class="monospaced">011110000</span>
</td>
<td>322°</td>
<td><span class="monospaced">111100000</span>
</td></tr>
<tr>
<td>3°</td>
<td><span class="monospaced">111000011</span>
</td>
<td>43°</td>
<td><span class="monospaced">110000111</span>
</td>
<td>83°</td>
<td><span class="monospaced">100001111</span>
</td>
<td>123°</td>
<td><span class="monospaced">000011111</span>
</td>
<td>163°</td>
<td><span class="monospaced">000111110</span>
</td>
<td>203°</td>
<td><span class="monospaced">001111100</span>
</td>
<td>243°</td>
<td><span class="monospaced">011111000</span>
</td>
<td>283°</td>
<td><span class="monospaced">111110000</span>
</td>
<td>323°</td>
<td><span class="monospaced">111100001</span>
</td></tr>
<tr>
<td>4°</td>
<td><span class="monospaced">111000111</span>
</td>
<td>44°</td>
<td><span class="monospaced">110001111</span>
</td>
<td>84°</td>
<td><span class="monospaced">100011111</span>
</td>
<td>124°</td>
<td><span class="monospaced">000111111</span>
</td>
<td>164°</td>
<td><span class="monospaced">001111110</span>
</td>
<td>204°</td>
<td><span class="monospaced">011111100</span>
</td>
<td>244°</td>
<td><span class="monospaced">111111000</span>
</td>
<td>284°</td>
<td><span class="monospaced">111110001</span>
</td>
<td>324°</td>
<td><span class="monospaced">111100011</span>
</td></tr>
<tr>
<td>5°</td>
<td><span class="monospaced">111001111</span>
</td>
<td>45°</td>
<td><span class="monospaced">110011111</span>
</td>
<td>85°</td>
<td><span class="monospaced">100111111</span>
</td>
<td>125°</td>
<td><span class="monospaced">001111111</span>
</td>
<td>165°</td>
<td><span class="monospaced">011111110</span>
</td>
<td>205°</td>
<td><span class="monospaced">111111100</span>
</td>
<td>245°</td>
<td><span class="monospaced">111111001</span>
</td>
<td>285°</td>
<td><span class="monospaced">111110011</span>
</td>
<td>325°</td>
<td><span class="monospaced">111100111</span>
</td></tr>
<tr>
<td>6°</td>
<td><span class="monospaced">111011111</span>
</td>
<td>46°</td>
<td><span class="monospaced">110111111</span>
</td>
<td>86°</td>
<td><span class="monospaced">101111111</span>
</td>
<td>126°</td>
<td><span class="monospaced">011111111</span>
</td>
<td>166°</td>
<td><span class="monospaced">111111110</span>
</td>
<td>206°</td>
<td><span class="monospaced">111111101</span>
</td>
<td>246°</td>
<td><span class="monospaced">111111011</span>
</td>
<td>286°</td>
<td><span class="monospaced">111110111</span>
</td>
<td>326°</td>
<td><span class="monospaced">111101111</span>
</td></tr>
<tr>
<td>7°</td>
<td><span class="monospaced">111011011</span>
</td>
<td>47°</td>
<td><span class="monospaced">110110111</span>
</td>
<td>87°</td>
<td><span class="monospaced">101101111</span>
</td>
<td>127°</td>
<td><span class="monospaced">011011111</span>
</td>
<td>167°</td>
<td><span class="monospaced">110111110</span>
</td>
<td>207°</td>
<td><span class="monospaced">101111101</span>
</td>
<td>247°</td>
<td><span class="monospaced">011111011</span>
</td>
<td>287°</td>
<td><span class="monospaced">111110110</span>
</td>
<td>327°</td>
<td><span class="monospaced">111101101</span>
</td></tr>
<tr>
<td>8°</td>
<td><span class="monospaced">101011011</span>
</td>
<td>48°</td>
<td><span class="monospaced">010110111</span>
</td>
<td>88°</td>
<td><span class="monospaced">101101110</span>
</td>
<td>128°</td>
<td><span class="monospaced">011011101</span>
</td>
<td>168°</td>
<td><span class="monospaced">110111010</span>
</td>
<td>208°</td>
<td><span class="monospaced">101110101</span>
</td>
<td>248°</td>
<td><span class="monospaced">011101011</span>
</td>
<td>288°</td>
<td><span class="monospaced">111010110</span>
</td>
<td>328°</td>
<td><span class="monospaced">110101101</span>
</td></tr>
<tr>
<td>9°</td>
<td><span class="monospaced">101011111</span>
</td>
<td>49°</td>
<td><span class="monospaced">010111111</span>
</td>
<td>89°</td>
<td><span class="monospaced">101111110</span>
</td>
<td>129°</td>
<td><span class="monospaced">011111101</span>
</td>
<td>169°</td>
<td><span class="monospaced">111111010</span>
</td>
<td>209°</td>
<td><span class="monospaced">111110101</span>
</td>
<td>249°</td>
<td><span class="monospaced">111101011</span>
</td>
<td>289°</td>
<td><span class="monospaced">111010111</span>
</td>
<td>329°</td>
<td><span class="monospaced">110101111</span>
</td></tr>
<tr>
<td>10°</td>
<td><span class="monospaced">101011101</span>
</td>
<td>50°</td>
<td><span class="monospaced">010111011</span>
</td>
<td>90°</td>
<td><span class="monospaced">101110110</span>
</td>
<td>130°</td>
<td><span class="monospaced">011101101</span>
</td>
<td>170°</td>
<td><span class="monospaced">111011010</span>
</td>
<td>210°</td>
<td><span class="monospaced">110110101</span>
</td>
<td>250°</td>
<td><span class="monospaced">101101011</span>
</td>
<td>290°</td>
<td><span class="monospaced">011010111</span>
</td>
<td>330°</td>
<td><span class="monospaced">110101110</span>
</td></tr>
<tr>
<td>11°</td>
<td><span class="monospaced">101010101</span>
</td>
<td>51°</td>
<td><span class="monospaced">010101011</span>
</td>
<td>91°</td>
<td><span class="monospaced">101010110</span>
</td>
<td>131°</td>
<td><span class="monospaced">010101101</span>
</td>
<td>171°</td>
<td><span class="monospaced">101011010</span>
</td>
<td>211°</td>
<td><span class="monospaced">010110101</span>
</td>
<td>251°</td>
<td><span class="monospaced">101101010</span>
</td>
<td>291°</td>
<td><span class="monospaced">011010101</span>
</td>
<td>331°</td>
<td><span class="monospaced">110101010</span>
</td></tr>
<tr>
<td>12°</td>
<td><span class="monospaced">101010111</span>
</td>
<td>52°</td>
<td><span class="monospaced">010101111</span>
</td>
<td>92°</td>
<td><span class="monospaced">101011110</span>
</td>
<td>132°</td>
<td><span class="monospaced">010111101</span>
</td>
<td>172°</td>
<td><span class="monospaced">101111010</span>
</td>
<td>212°</td>
<td><span class="monospaced">011110101</span>
</td>
<td>252°</td>
<td><span class="monospaced">111101010</span>
</td>
<td>292°</td>
<td><span class="monospaced">111010101</span>
</td>
<td>332°</td>
<td><span class="monospaced">110101011</span>
</td></tr>
<tr>
<td>13°</td>
<td><span class="monospaced">101110111</span>
</td>
<td>53°</td>
<td><span class="monospaced">011101111</span>
</td>
<td>93°</td>
<td><span class="monospaced">111011110</span>
</td>
<td>133°</td>
<td><span class="monospaced">110111101</span>
</td>
<td>173°</td>
<td><span class="monospaced">101111011</span>
</td>
<td>213°</td>
<td><span class="monospaced">011110111</span>
</td>
<td>253°</td>
<td><span class="monospaced">111101110</span>
</td>
<td>293°</td>
<td><span class="monospaced">111011101</span>
</td>
<td>333°</td>
<td><span class="monospaced">110111011</span>
</td></tr>
<tr>
<td>14°</td>
<td><span class="monospaced">001110111</span>
</td>
<td>54°</td>
<td><span class="monospaced">011101110</span>
</td>
<td>94°</td>
<td><span class="monospaced">111011100</span>
</td>
<td>134°</td>
<td><span class="monospaced">110111001</span>
</td>
<td>174°</td>
<td><span class="monospaced">101110011</span>
</td>
<td>214°</td>
<td><span class="monospaced">011100111</span>
</td>
<td>254°</td>
<td><span class="monospaced">111001110</span>
</td>
<td>294°</td>
<td><span class="monospaced">110011101</span>
</td>
<td>334°</td>
<td><span class="monospaced">100111011</span>
</td></tr>
<tr>
<td>15°</td>
<td><span class="monospaced">001010111</span>
</td>
<td>55°</td>
<td><span class="monospaced">010101110</span>
</td>
<td>95°</td>
<td><span class="monospaced">101011100</span>
</td>
<td>135°</td>
<td><span class="monospaced">010111001</span>
</td>
<td>175°</td>
<td><span class="monospaced">101110010</span>
</td>
<td>215°</td>
<td><span class="monospaced">011100101</span>
</td>
<td>255°</td>
<td><span class="monospaced">111001010</span>
</td>
<td>295°</td>
<td><span class="monospaced">110010101</span>
</td>
<td>335°</td>
<td><span class="monospaced">100101011</span>
</td></tr>
<tr>
<td>16°</td>
<td><span class="monospaced">001011111</span>
</td>
<td>56°</td>
<td><span class="monospaced">010111110</span>
</td>
<td>96°</td>
<td><span class="monospaced">101111100</span>
</td>
<td>136°</td>
<td><span class="monospaced">011111001</span>
</td>
<td>176°</td>
<td><span class="monospaced">111110010</span>
</td>
<td>216°</td>
<td><span class="monospaced">111100101</span>
</td>
<td>256°</td>
<td><span class="monospaced">111001011</span>
</td>
<td>296°</td>
<td><span class="monospaced">110010111</span>
</td>
<td>336°</td>
<td><span class="monospaced">100101111</span>
</td></tr>
<tr>
<td>17°</td>
<td><span class="monospaced">001011011</span>
</td>
<td>57°</td>
<td><span class="monospaced">010110110</span>
</td>
<td>97°</td>
<td><span class="monospaced">101101100</span>
</td>
<td>137°</td>
<td><span class="monospaced">011011001</span>
</td>
<td>177°</td>
<td><span class="monospaced">110110010</span>
</td>
<td>217°</td>
<td><span class="monospaced">101100101</span>
</td>
<td>257°</td>
<td><span class="monospaced">011001011</span>
</td>
<td>297°</td>
<td><span class="monospaced">110010110</span>
</td>
<td>337°</td>
<td><span class="monospaced">100101101</span>
</td></tr>
<tr>
<td>18°</td>
<td><span class="monospaced">001011001</span>
</td>
<td>58°</td>
<td><span class="monospaced">010110010</span>
</td>
<td>98°</td>
<td><span class="monospaced">101100100</span>
</td>
<td>138°</td>
<td><span class="monospaced">011001001</span>
</td>
<td>178°</td>
<td><span class="monospaced">110010010</span>
</td>
<td>218°</td>
<td><span class="monospaced">100100101</span>
</td>
<td>258°</td>
<td><span class="monospaced">001001011</span>
</td>
<td>298°</td>
<td><span class="monospaced">010010110</span>
</td>
<td>338°</td>
<td><span class="monospaced">100101100</span>
</td></tr>
<tr>
<td>19°</td>
<td><span class="monospaced">001111001</span>
</td>
<td>59°</td>
<td><span class="monospaced">011110010</span>
</td>
<td>99°</td>
<td><span class="monospaced">111100100</span>
</td>
<td>139°</td>
<td><span class="monospaced">111001001</span>
</td>
<td>179°</td>
<td><span class="monospaced">110010011</span>
</td>
<td>219°</td>
<td><span class="monospaced">100100111</span>
</td>
<td>259°</td>
<td><span class="monospaced">001001111</span>
</td>
<td>299°</td>
<td><span class="monospaced">010011110</span>
</td>
<td>339°</td>
<td><span class="monospaced">100111100</span>
</td></tr>
<tr>
<td>20°</td>
<td><span class="monospaced">001111101</span>
</td>
<td>60°</td>
<td><span class="monospaced">011111010</span>
</td>
<td>100°</td>
<td><span class="monospaced">111110100</span>
</td>
<td>140°</td>
<td><span class="monospaced">111101001</span>
</td>
<td>180°</td>
<td><span class="monospaced">111010011</span>
</td>
<td>220°</td>
<td><span class="monospaced">110100111</span>
</td>
<td>260°</td>
<td><span class="monospaced">101001111</span>
</td>
<td>300°</td>
<td><span class="monospaced">010011111</span>
</td>
<td>340°</td>
<td><span class="monospaced">100111110</span>
</td></tr>
<tr>
<td>21°</td>
<td><span class="monospaced">000111101</span>
</td>
<td>61°</td>
<td><span class="monospaced">001111010</span>
</td>
<td>101°</td>
<td><span class="monospaced">011110100</span>
</td>
<td>141°</td>
<td><span class="monospaced">111101000</span>
</td>
<td>181°</td>
<td><span class="monospaced">111010001</span>
</td>
<td>221°</td>
<td><span class="monospaced">110100011</span>
</td>
<td>261°</td>
<td><span class="monospaced">101000111</span>
</td>
<td>301°</td>
<td><span class="monospaced">010001111</span>
</td>
<td>341°</td>
<td><span class="monospaced">100011110</span>
</td></tr>
<tr>
<td>22°</td>
<td><span class="monospaced">000110101</span>
</td>
<td>62°</td>
<td><span class="monospaced">001101010</span>
</td>
<td>102°</td>
<td><span class="monospaced">011010100</span>
</td>
<td>142°</td>
<td><span class="monospaced">110101000</span>
</td>
<td>182°</td>
<td><span class="monospaced">101010001</span>
</td>
<td>222°</td>
<td><span class="monospaced">010100011</span>
</td>
<td>262°</td>
<td><span class="monospaced">101000110</span>
</td>
<td>302°</td>
<td><span class="monospaced">010001101</span>
</td>
<td>342°</td>
<td><span class="monospaced">100011010</span>
</td></tr>
<tr>
<td>23°</td>
<td><span class="monospaced">000100101</span>
</td>
<td>63°</td>
<td><span class="monospaced">001001010</span>
</td>
<td>103°</td>
<td><span class="monospaced">010010100</span>
</td>
<td>143°</td>
<td><span class="monospaced">100101000</span>
</td>
<td>183°</td>
<td><span class="monospaced">001010001</span>
</td>
<td>223°</td>
<td><span class="monospaced">010100010</span>
</td>
<td>263°</td>
<td><span class="monospaced">101000100</span>
</td>
<td>303°</td>
<td><span class="monospaced">010001001</span>
</td>
<td>343°</td>
<td><span class="monospaced">100010010</span>
</td></tr>
<tr>
<td>24°</td>
<td><span class="monospaced">000101101</span>
</td>
<td>64°</td>
<td><span class="monospaced">001011010</span>
</td>
<td>104°</td>
<td><span class="monospaced">010110100</span>
</td>
<td>144°</td>
<td><span class="monospaced">101101000</span>
</td>
<td>184°</td>
<td><span class="monospaced">011010001</span>
</td>
<td>224°</td>
<td><span class="monospaced">110100010</span>
</td>
<td>264°</td>
<td><span class="monospaced">101000101</span>
</td>
<td>304°</td>
<td><span class="monospaced">010001011</span>
</td>
<td>344°</td>
<td><span class="monospaced">100010110</span>
</td></tr>
<tr>
<td>25°</td>
<td><span class="monospaced">000101001</span>
</td>
<td>65°</td>
<td><span class="monospaced">001010010</span>
</td>
<td>105°</td>
<td><span class="monospaced">010100100</span>
</td>
<td>145°</td>
<td><span class="monospaced">101001000</span>
</td>
<td>185°</td>
<td><span class="monospaced">010010001</span>
</td>
<td>225°</td>
<td><span class="monospaced">100100010</span>
</td>
<td>265°</td>
<td><span class="monospaced">001000101</span>
</td>
<td>305°</td>
<td><span class="monospaced">010001010</span>
</td>
<td>345°</td>
<td><span class="monospaced">100010100</span>
</td></tr>
<tr>
<td>26°</td>
<td><span class="monospaced">000111001</span>
</td>
<td>66°</td>
<td><span class="monospaced">001110010</span>
</td>
<td>106°</td>
<td><span class="monospaced">011100100</span>
</td>
<td>146°</td>
<td><span class="monospaced">111001000</span>
</td>
<td>186°</td>
<td><span class="monospaced">110010001</span>
</td>
<td>226°</td>
<td><span class="monospaced">100100011</span>
</td>
<td>266°</td>
<td><span class="monospaced">001000111</span>
</td>
<td>306°</td>
<td><span class="monospaced">010001110</span>
</td>
<td>346°</td>
<td><span class="monospaced">100011100</span>
</td></tr>
<tr>
<td>27°</td>
<td><span class="monospaced">000110001</span>
</td>
<td>67°</td>
<td><span class="monospaced">001100010</span>
</td>
<td>107°</td>
<td><span class="monospaced">011000100</span>
</td>
<td>147°</td>
<td><span class="monospaced">110001000</span>
</td>
<td>187°</td>
<td><span class="monospaced">100010001</span>
</td>
<td>227°</td>
<td><span class="monospaced">000100011</span>
</td>
<td>267°</td>
<td><span class="monospaced">001000110</span>
</td>
<td>307°</td>
<td><span class="monospaced">010001100</span>
</td>
<td>347°</td>
<td><span class="monospaced">100011000</span>
</td></tr>
<tr>
<td>28°</td>
<td><span class="monospaced">000010001</span>
</td>
<td>68°</td>
<td><span class="monospaced">000100010</span>
</td>
<td>108°</td>
<td><span class="monospaced">001000100</span>
</td>
<td>148°</td>
<td><span class="monospaced">010001000</span>
</td>
<td>188°</td>
<td><span class="monospaced">100010000</span>
</td>
<td>228°</td>
<td><span class="monospaced">000100001</span>
</td>
<td>268°</td>
<td><span class="monospaced">001000010</span>
</td>
<td>308°</td>
<td><span class="monospaced">010000100</span>
</td>
<td>348°</td>
<td><span class="monospaced">100001000</span>
</td></tr>
<tr>
<td>29°</td>
<td><span class="monospaced">000011001</span>
</td>
<td>69°</td>
<td><span class="monospaced">000110010</span>
</td>
<td>109°</td>
<td><span class="monospaced">001100100</span>
</td>
<td>149°</td>
<td><span class="monospaced">011001000</span>
</td>
<td>189°</td>
<td><span class="monospaced">110010000</span>
</td>
<td>229°</td>
<td><span class="monospaced">100100001</span>
</td>
<td>269°</td>
<td><span class="monospaced">001000011</span>
</td>
<td>309°</td>
<td><span class="monospaced">010000110</span>
</td>
<td>349°</td>
<td><span class="monospaced">100001100</span>
</td></tr>
<tr>
<td>30°</td>
<td><span class="monospaced">000001001</span>
</td>
<td>70°</td>
<td><span class="monospaced">000010010</span>
</td>
<td>110°</td>
<td><span class="monospaced">000100100</span>
</td>
<td>150°</td>
<td><span class="monospaced">001001000</span>
</td>
<td>190°</td>
<td><span class="monospaced">010010000</span>
</td>
<td>230°</td>
<td><span class="monospaced">100100000</span>
</td>
<td>270°</td>
<td><span class="monospaced">001000001</span>
</td>
<td>310°</td>
<td><span class="monospaced">010000010</span>
</td>
<td>350°</td>
<td><span class="monospaced">100000100</span>
</td></tr>
<tr>
<td>31°</td>
<td><span class="monospaced">100001001</span>
</td>
<td>71°</td>
<td><span class="monospaced">000010011</span>
</td>
<td>111°</td>
<td><span class="monospaced">000100110</span>
</td>
<td>151°</td>
<td><span class="monospaced">001001100</span>
</td>
<td>191°</td>
<td><span class="monospaced">010011000</span>
</td>
<td>231°</td>
<td><span class="monospaced">100110000</span>
</td>
<td>271°</td>
<td><span class="monospaced">001100001</span>
</td>
<td>311°</td>
<td><span class="monospaced">011000010</span>
</td>
<td>351°</td>
<td><span class="monospaced">110000100</span>
</td></tr>
<tr>
<td>32°</td>
<td><span class="monospaced">100001101</span>
</td>
<td>72°</td>
<td><span class="monospaced">000011011</span>
</td>
<td>112°</td>
<td><span class="monospaced">000110110</span>
</td>
<td>152°</td>
<td><span class="monospaced">001101100</span>
</td>
<td>192°</td>
<td><span class="monospaced">011011000</span>
</td>
<td>232°</td>
<td><span class="monospaced">110110000</span>
</td>
<td>272°</td>
<td><span class="monospaced">101100001</span>
</td>
<td>312°</td>
<td><span class="monospaced">011000011</span>
</td>
<td>352°</td>
<td><span class="monospaced">110000110</span>
</td></tr>
<tr>
<td>33°</td>
<td><span class="monospaced">100000101</span>
</td>
<td>73°</td>
<td><span class="monospaced">000001011</span>
</td>
<td>113°</td>
<td><span class="monospaced">000010110</span>
</td>
<td>153°</td>
<td><span class="monospaced">000101100</span>
</td>
<td>193°</td>
<td><span class="monospaced">001011000</span>
</td>
<td>233°</td>
<td><span class="monospaced">010110000</span>
</td>
<td>273°</td>
<td><span class="monospaced">101100000</span>
</td>
<td>313°</td>
<td><span class="monospaced">011000001</span>
</td>
<td>353°</td>
<td><span class="monospaced">110000010</span>
</td></tr>
<tr>
<td>34°</td>
<td><span class="monospaced">110000101</span>
</td>
<td>74°</td>
<td><span class="monospaced">100001011</span>
</td>
<td>114°</td>
<td><span class="monospaced">000010111</span>
</td>
<td>154°</td>
<td><span class="monospaced">000101110</span>
</td>
<td>194°</td>
<td><span class="monospaced">001011100</span>
</td>
<td>234°</td>
<td><span class="monospaced">010111000</span>
</td>
<td>274°</td>
<td><span class="monospaced">101110000</span>
</td>
<td>314°</td>
<td><span class="monospaced">011100001</span>
</td>
<td>354°</td>
<td><span class="monospaced">111000010</span>
</td></tr>
<tr>
<td>35°</td>
<td><span class="monospaced">010000101</span>
</td>
<td>75°</td>
<td><span class="monospaced">100001010</span>
</td>
<td>115°</td>
<td><span class="monospaced">000010101</span>
</td>
<td>155°</td>
<td><span class="monospaced">000101010</span>
</td>
<td>195°</td>
<td><span class="monospaced">001010100</span>
</td>
<td>235°</td>
<td><span class="monospaced">010101000</span>
</td>
<td>275°</td>
<td><span class="monospaced">101010000</span>
</td>
<td>315°</td>
<td><span class="monospaced">010100001</span>
</td>
<td>355°</td>
<td><span class="monospaced">101000010</span>
</td></tr>
<tr>
<td>36°</td>
<td><span class="monospaced">010000111</span>
</td>
<td>76°</td>
<td><span class="monospaced">100001110</span>
</td>
<td>116°</td>
<td><span class="monospaced">000011101</span>
</td>
<td>156°</td>
<td><span class="monospaced">000111010</span>
</td>
<td>196°</td>
<td><span class="monospaced">001110100</span>
</td>
<td>236°</td>
<td><span class="monospaced">011101000</span>
</td>
<td>276°</td>
<td><span class="monospaced">111010000</span>
</td>
<td>316°</td>
<td><span class="monospaced">110100001</span>
</td>
<td>356°</td>
<td><span class="monospaced">101000011</span>
</td></tr>
<tr>
<td>37°</td>
<td><span class="monospaced">010000011</span>
</td>
<td>77°</td>
<td><span class="monospaced">100000110</span>
</td>
<td>117°</td>
<td><span class="monospaced">000001101</span>
</td>
<td>157°</td>
<td><span class="monospaced">000011010</span>
</td>
<td>197°</td>
<td><span class="monospaced">000110100</span>
</td>
<td>237°</td>
<td><span class="monospaced">001101000</span>
</td>
<td>277°</td>
<td><span class="monospaced">011010000</span>
</td>
<td>317°</td>
<td><span class="monospaced">110100000</span>
</td>
<td>357°</td>
<td><span class="monospaced">101000001</span>
</td></tr>
<tr>
<td>38°</td>
<td><span class="monospaced">010000001</span>
</td>
<td>78°</td>
<td><span class="monospaced">100000010</span>
</td>
<td>118°</td>
<td><span class="monospaced">000000101</span>
</td>
<td>158°</td>
<td><span class="monospaced">000001010</span>
</td>
<td>198°</td>
<td><span class="monospaced">000010100</span>
</td>
<td>238°</td>
<td><span class="monospaced">000101000</span>
</td>
<td>278°</td>
<td><span class="monospaced">001010000</span>
</td>
<td>318°</td>
<td><span class="monospaced">010100000</span>
</td>
<td>358°</td>
<td><span class="monospaced">101000000</span>
</td></tr>
<tr>
<td>39°</td>
<td><span class="monospaced">000000001</span>
</td>
<td>79°</td>
<td><span class="monospaced">000000010</span>
</td>
<td>119°</td>
<td><span class="monospaced">000000100</span>
</td>
<td>159°</td>
<td><span class="monospaced">000001000</span>
</td>
<td>199°</td>
<td><span class="monospaced">000010000</span>
</td>
<td>239°</td>
<td><span class="monospaced">000100000</span>
</td>
<td>279°</td>
<td><span class="monospaced">001000000</span>
</td>
<td>319°</td>
<td><span class="monospaced">010000000</span>
</td>
<td>359°</td>
<td><span class="monospaced">100000000</span>
</td></tr></tbody></table>
<table class="wikitable" style="text-align:center; background:#FFFFFF; border-width:0;">
<caption>Starting and ending angles for the 20 tracks for a single-track Gray code with 9 sensors separated by 40°
</caption>
<tbody><tr>
<th>Starting angle</th>
<th>Ending angle</th>
<th>Length
</th>
<td rowspan="21" style="text-align:center; background:#FFFFFF; border-width:0;">
</td></tr>
<tr>
<td>3</td>
<td>4</td>
<td>2
</td></tr>
<tr>
<td>23</td>
<td>28</td>
<td>6
</td></tr>
<tr>
<td>31</td>
<td>37</td>
<td>7
</td></tr>
<tr>
<td>44</td>
<td>48</td>
<td>5
</td></tr>
<tr>
<td>56</td>
<td>60</td>
<td>5
</td></tr>
<tr>
<td>64</td>
<td>71</td>
<td>8
</td></tr>
<tr>
<td>74</td>
<td>76</td>
<td>3
</td></tr>
<tr>
<td>88</td>
<td>91</td>
<td>4
</td></tr>
<tr>
<td>94</td>
<td>96</td>
<td>3
</td></tr>
<tr>
<td>99</td>
<td>104</td>
<td>6
</td></tr>
<tr>
<td>110</td>
<td>115</td>
<td>6
</td></tr>
<tr>
<td>131</td>
<td>134</td>
<td>4
</td></tr>
<tr>
<td>138</td>
<td>154</td>
<td>17
</td></tr>
<tr>
<td>173</td>
<td>181</td>
<td>9
</td></tr>
<tr>
<td>186</td>
<td>187</td>
<td>2
</td></tr>
<tr>
<td>220</td>
<td>238</td>
<td>19
</td></tr>
<tr>
<td>242</td>
<td>246</td>
<td>5
</td></tr>
<tr>
<td>273</td>
<td>279</td>
<td>7
</td></tr>
<tr>
<td>286</td>
<td>289</td>
<td>4
</td></tr>
<tr>
<td>307</td>
<td>360</td>
<td>54
</td></tr></tbody></table>
<div class="mw-heading mw-heading3"><h3 id="Two-dimensional_Gray_code">Two-dimensional Gray code</h3></div>

<p>Two-dimensional Gray codes are used in communication to minimize the number of bit errors in <a href="Quadrature_amplitude_modulation" title="Quadrature amplitude modulation">quadrature amplitude modulation</a> (QAM) adjacent points in the <a href="Constellation_diagram" title="Constellation diagram">constellation</a>. In a typical encoding the horizontal and vertical adjacent constellation points differ by a single bit, and diagonal adjacent points differ by 2 bits.<sup id="cite_ref-Krishna_2008_85-0" class="reference"><a href="#cite_note-Krishna_2008-85"><span class="cite-bracket">[</span>83<span class="cite-bracket">]</span></a></sup>
</p><p>Two-dimensional Gray codes also have uses in <a href="Location_identification" class="mw-redirect" title="Location identification">location identifications</a> schemes, where the code would be applied to area maps such as a <a href="Mercator_projection" title="Mercator projection">Mercator projection</a> of the earth's surface and an appropriate cyclic two-dimensional distance function such as the <a href="Mannheim_metric" class="mw-redirect" title="Mannheim metric">Mannheim metric</a> be used to calculate the distance between two encoded locations, thereby combining the characteristics of the <a href="Hamming_distance" title="Hamming distance">Hamming distance</a> with the cyclic continuation of a Mercator projection.<sup id="cite_ref-Strang-Dammann-Roeckl-Plass_2009_86-0" class="reference"><a href="#cite_note-Strang-Dammann-Roeckl-Plass_2009-86"><span class="cite-bracket">[</span>84<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Excess_Gray_code">Excess Gray code</h3></div>
<p>If a subsection of a specific codevalue is extracted from that value, for example the last 3 bits of a 4-bit Gray code, the resulting code will be an "excess Gray code". This code shows the property of counting backwards in those extracted bits if the original value is further increased. Reason for this is that Gray-encoded values do not show the behaviour of overflow, known from classic binary encoding, when increasing past the "highest" value.
</p><p>Example: The highest 3-bit Gray code, 7, is encoded as (0)100. Adding 1 results in number 8, encoded in Gray as 1100. The last 3 bits do not overflow and count backwards if you further increase the original 4 bit code.
</p><p>When working with sensors that output multiple, Gray-encoded values in a serial fashion, one should therefore pay attention whether the sensor produces those multiple values encoded in 1 single Gray code or as separate ones, as otherwise the values might appear to be counting backwards when an "overflow" is expected.
</p>
<div class="mw-heading mw-heading2"><h2 id="Gray_isometry">Gray isometry</h2></div>
<p>The bijective mapping { 0 ↔ <span class="monospaced">00</span>, 1 ↔ <span class="monospaced">01</span>, 2 ↔ <span class="monospaced">11</span>, 3 ↔ <span class="monospaced">10</span> } establishes an <a href="Isometry" title="Isometry">isometry</a> between the <a href="Metric_space" title="Metric space">metric space</a> over the <a href="Finite_field" title="Finite field">finite field</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{2}^{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{2}^{2}}</annotation>
</semantics>
</math></span><img src="./f86cdebd065ce715185fea5e604557ac15453826.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.605ex; height:3.176ex;" alt="{\displaystyle \mathbb {Z} _{2}^{2}}" loading="lazy"></span> with the metric given by the <a href="Hamming_distance" title="Hamming distance">Hamming distance</a> and the metric space over the <a href="Finite_ring" title="Finite ring">finite ring</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{4}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{4}}</annotation>
</semantics>
</math></span><img src="./5ecbc000fbd9a59f44ec7502f5e4f4b24f9a8e06.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.605ex; height:2.509ex;" alt="{\displaystyle \mathbb {Z} _{4}}" loading="lazy"></span> (the usual <a href="Modular_arithmetic" title="Modular arithmetic">modular arithmetic</a>) with the metric given by the <a href="Lee_distance" title="Lee distance">Lee distance</a>. The mapping is suitably extended to an isometry of the <a href="Hamming_space" title="Hamming space">Hamming spaces</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{2}^{2m}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
<mi>m</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{2}^{2m}}</annotation>
</semantics>
</math></span><img src="./c95e46f6e851988f7bf14fed668b93831351f148.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.047ex; height:3.176ex;" alt="{\displaystyle \mathbb {Z} _{2}^{2m}}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{4}^{m}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{4}^{m}}</annotation>
</semantics>
</math></span><img src="./17ffb5c4a91673878356885f5d3401856c907eef.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.225ex; height:2.843ex;" alt="{\displaystyle \mathbb {Z} _{4}^{m}}" loading="lazy"></span>. Its importance lies in establishing a correspondence between various "good" but not necessarily <a href="Linear_code" title="Linear code">linear codes</a> as Gray-map images in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{2}^{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{2}^{2}}</annotation>
</semantics>
</math></span><img src="./f86cdebd065ce715185fea5e604557ac15453826.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.605ex; height:3.176ex;" alt="{\displaystyle \mathbb {Z} _{2}^{2}}" loading="lazy"></span> of <a href="Linear_code#Generalization" title="Linear code">ring-linear codes</a> from <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{4}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{4}}</annotation>
</semantics>
</math></span><img src="./5ecbc000fbd9a59f44ec7502f5e4f4b24f9a8e06.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.605ex; height:2.509ex;" alt="{\displaystyle \mathbb {Z} _{4}}" loading="lazy"></span>.<sup id="cite_ref-Greferath_2009_87-0" class="reference"><a href="#cite_note-Greferath_2009-87"><span class="cite-bracket">[</span>85<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hazewinkel-Sole_2016_88-0" class="reference"><a href="#cite_note-Hazewinkel-Sole_2016-88"><span class="cite-bracket">[</span>86<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Related_codes">Related codes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1305433154">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>
<p>There are a number of binary codes similar to Gray codes, including:
</p>
<ul><li>Datex codes or Giannini codes (1954), as described by Carl P. Spaulding,<sup id="cite_ref-Spaulding_1954_7-2" class="reference"><a href="#cite_note-Spaulding_1954-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Spaulding_1965_89-0" class="reference"><a href="#cite_note-Spaulding_1965-89"><span class="cite-bracket">[</span>87<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Wheeler_1969_90-0" class="reference"><a href="#cite_note-Wheeler_1969-90"><span class="cite-bracket">[</span>88<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1973_91-0" class="reference"><a href="#cite_note-Dokter-Steinhauer_1973-91"><span class="cite-bracket">[</span>89<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1975_92-0" class="reference"><a href="#cite_note-Dokter-Steinhauer_1975-92"><span class="cite-bracket">[</span>90<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-MIL_1991_6-2" class="reference"><a href="#cite_note-MIL_1991-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> use a variant of <a href="#O'Brien_II">O'Brien code&nbsp;II</a>.</li>
<li> Codes used by Varec (c. 1954),<sup id="cite_ref-Varec_1954_93-0" class="reference"><a href="#cite_note-Varec_1954-93"><span class="cite-bracket">[</span>91<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Bishup-Repeta-Giarrizzo_1963_94-0" class="reference"><a href="#cite_note-Bishup-Repeta-Giarrizzo_1963-94"><span class="cite-bracket">[</span>92<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Whessoe_1993_95-0" class="reference"><a href="#cite_note-Whessoe_1993-95"><span class="cite-bracket">[</span>93<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Emerson_96-0" class="reference"><a href="#cite_note-Emerson-96"><span class="cite-bracket">[</span>94<span class="cite-bracket">]</span></a></sup> use a variant of <a href="#O'Brien_I">O'Brien code I</a> as well as base-12 and base-16 Gray code variants.</li>
<li>Lucal code (1959)<sup id="cite_ref-Lucal_1959_97-0" class="reference"><a href="#cite_note-Lucal_1959-97"><span class="cite-bracket">[</span>95<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Sellers-Hsiao-Bearnson_1968_98-0" class="reference"><a href="#cite_note-Sellers-Hsiao-Bearnson_1968-98"><span class="cite-bracket">[</span>96<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Doran_2007_56-1" class="reference"><a href="#cite_note-Doran_2007-56"><span class="cite-bracket">[</span>55<span class="cite-bracket">]</span></a></sup> aka modified reflected binary code (MRB)<sup id="cite_ref-Lucal_1959_97-1" class="reference"><a href="#cite_note-Lucal_1959-97"><span class="cite-bracket">[</span>95<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Sellers-Hsiao-Bearnson_1968_98-1" class="reference"><a href="#cite_note-Sellers-Hsiao-Bearnson_1968-98"><span class="cite-bracket">[</span>96<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Modified_99-0" class="reference"><a href="#cite_note-NB_Modified-99"><span class="cite-bracket">[</span>nb 3<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Gillham_code" title="Gillham code">Gillham code</a> (1961/1962),<sup id="cite_ref-Wheeler_1969_90-1" class="reference"><a href="#cite_note-Wheeler_1969-90"><span class="cite-bracket">[</span>88<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Wightman_1972_100-0" class="reference"><a href="#cite_note-Wightman_1972-100"><span class="cite-bracket">[</span>97<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-MIL_1991_6-3" class="reference"><a href="#cite_note-MIL_1991-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Phillips_1998_101-0" class="reference"><a href="#cite_note-Phillips_1998-101"><span class="cite-bracket">[</span>98<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Stewart_2010_102-0" class="reference"><a href="#cite_note-Stewart_2010-102"><span class="cite-bracket">[</span>99<span class="cite-bracket">]</span></a></sup> uses a variant of <a href="#Datex">Datex</a> code and <a href="#O'Brien_II">O'Brien code&nbsp;II</a>.</li>
<li>Leslie and Russell code (1964)<sup id="cite_ref-Leslie-Russell_1964_103-0" class="reference"><a href="#cite_note-Leslie-Russell_1964-103"><span class="cite-bracket">[</span>100<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Russell_1964_8-1" class="reference"><a href="#cite_note-Russell_1964-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Leslie_1974_104-0" class="reference"><a href="#cite_note-Leslie_1974-104"><span class="cite-bracket">[</span>101<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Wightman_1972_100-1" class="reference"><a href="#cite_note-Wightman_1972-100"><span class="cite-bracket">[</span>97<span class="cite-bracket">]</span></a></sup></li>
<li>Royal Radar Establishment code<sup id="cite_ref-Wightman_1972_100-2" class="reference"><a href="#cite_note-Wightman_1972-100"><span class="cite-bracket">[</span>97<span class="cite-bracket">]</span></a></sup></li>
<li>Hoklas code (1988)<sup id="cite_ref-Hoklas_1989_105-0" class="reference"><a href="#cite_note-Hoklas_1989-105"><span class="cite-bracket">[</span>102<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_1_106-0" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_2_107-0" class="reference"><a href="#cite_note-Hoklas_2005_2-107"><span class="cite-bracket">[</span>104<span class="cite-bracket">]</span></a></sup></li></ul>
<p>The following <a href="Binary-coded_decimal" title="Binary-coded decimal">binary-coded decimal</a> (BCD) codes are Gray code variants as well:
</p>
<ul><li>Petherick code (1953),<sup id="cite_ref-Petherick_1953_17-1" class="reference"><a href="#cite_note-Petherick_1953-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Petherick-Hopkins_1958_108-0" class="reference"><a href="#cite_note-Petherick-Hopkins_1958-108"><span class="cite-bracket">[</span>105<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Baumgartner_1963_109-0" class="reference"><a href="#cite_note-Baumgartner_1963-109"><span class="cite-bracket">[</span>106<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Charnley-Bidgood-Boardman_1965_110-0" class="reference"><a href="#cite_note-Charnley-Bidgood-Boardman_1965-110"><span class="cite-bracket">[</span>107<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Powell_1968_54-2" class="reference"><a href="#cite_note-Powell_1968-54"><span class="cite-bracket">[</span>53<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_1_106-1" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Petherick_OBrien-II_111-0" class="reference"><a href="#cite_note-NB_Petherick_OBrien-II-111"><span class="cite-bracket">[</span>nb 4<span class="cite-bracket">]</span></a></sup> also known as <a href="Royal_Aircraft_Establishment" title="Royal Aircraft Establishment">Royal Aircraft Establishment</a> (RAE) code.<sup id="cite_ref-Hollingdale_1958_112-0" class="reference"><a href="#cite_note-Hollingdale_1958-112"><span class="cite-bracket">[</span>108<span class="cite-bracket">]</span></a></sup></li>
<li>O'Brien codes I and II (1955)<sup id="cite_ref-O'Brien_1955_113-0" class="reference"><a href="#cite_note-O'Brien_1955-113"><span class="cite-bracket">[</span>109<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-0" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-0" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1973_91-1" class="reference"><a href="#cite_note-Dokter-Steinhauer_1973-91"><span class="cite-bracket">[</span>89<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1975_92-1" class="reference"><a href="#cite_note-Dokter-Steinhauer_1975-92"><span class="cite-bracket">[</span>90<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_1_106-2" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup> (An O'Brien type-I code<sup id="cite_ref-NB_OBrien-I_Glixon_116-0" class="reference"><a href="#cite_note-NB_OBrien-I_Glixon-116"><span class="cite-bracket">[</span>nb 5<span class="cite-bracket">]</span></a></sup> was already described by Frederic A. Foss of <a href="IBM" title="IBM">IBM</a><sup id="cite_ref-Foss_1954_1_117-0" class="reference"><a href="#cite_note-Foss_1954_1-117"><span class="cite-bracket">[</span>112<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Foss_1954_2_118-0" class="reference"><a href="#cite_note-Foss_1954_2-118"><span class="cite-bracket">[</span>113<span class="cite-bracket">]</span></a></sup> and used by <a href="#Varec">Varec</a> in 1954. Later, it was also known as Watts code or Watts reflected decimal (WRD) code and is sometimes ambiguously referred to as reflected binary modified Gray code.<sup id="cite_ref-Evans_1958_119-0" class="reference"><a href="#cite_note-Evans_1958-119"><span class="cite-bracket">[</span>114<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Evans_1960_18-1" class="reference"><a href="#cite_note-Evans_1960-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Evans_1961_19-1" class="reference"><a href="#cite_note-Evans_1961-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Benjamin-Nicholls_1963_120-0" class="reference"><a href="#cite_note-Benjamin-Nicholls_1963-120"><span class="cite-bracket">[</span>115<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Klinkowski_1964_121-0" class="reference"><a href="#cite_note-Klinkowski_1964-121"><span class="cite-bracket">[</span>116<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Klinkowski_1966_122-0" class="reference"><a href="#cite_note-Klinkowski_1966-122"><span class="cite-bracket">[</span>117<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-EDN_1967_123-0" class="reference"><a href="#cite_note-EDN_1967-123"><span class="cite-bracket">[</span>118<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Toth-Zentai_1979_124-0" class="reference"><a href="#cite_note-Toth-Zentai_1979-124"><span class="cite-bracket">[</span>119<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Savard_2018_125-0" class="reference"><a href="#cite_note-Savard_2018-125"><span class="cite-bracket">[</span>120<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Arithmetic_conversion_52-2" class="reference"><a href="#cite_note-NB_Arithmetic_conversion-52"><span class="cite-bracket">[</span>nb 1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Modified_99-1" class="reference"><a href="#cite_note-NB_Modified-99"><span class="cite-bracket">[</span>nb 3<span class="cite-bracket">]</span></a></sup> An O'Brien type-II code was already used by <a href="#Datex">Datex</a> in 1954.<sup id="cite_ref-NB_Petherick_OBrien-II_111-1" class="reference"><a href="#cite_note-NB_Petherick_OBrien-II-111"><span class="cite-bracket">[</span>nb 4<span class="cite-bracket">]</span></a></sup>)</li>
<li>Excess-3 Gray code (1956)<sup id="cite_ref-Turvey_1956_126-0" class="reference"><a href="#cite_note-Turvey_1956-126"><span class="cite-bracket">[</span>121<span class="cite-bracket">]</span></a></sup> (aka Gray <a href="Excess-3" title="Excess-3">excess-3</a> code,<sup id="cite_ref-Dokter-Steinhauer_1973_91-2" class="reference"><a href="#cite_note-Dokter-Steinhauer_1973-91"><span class="cite-bracket">[</span>89<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1975_92-2" class="reference"><a href="#cite_note-Dokter-Steinhauer_1975-92"><span class="cite-bracket">[</span>90<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-MIL_1991_6-4" class="reference"><a href="#cite_note-MIL_1991-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> Gray 3-excess code, reflex excess-3 code, excess Gray code,<sup id="cite_ref-Hoklas_2005_1_106-3" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup> Gray excess code, 10-excess-3 Gray code or Gray–Stibitz code), described by Frank P. Turvey Jr. of <a href="International_Telephone_and_Telegraph_Corporation" class="mw-redirect" title="International Telephone and Telegraph Corporation">ITT</a>.<sup id="cite_ref-Turvey_1956_126-1" class="reference"><a href="#cite_note-Turvey_1956-126"><span class="cite-bracket">[</span>121<span class="cite-bracket">]</span></a></sup></li>
<li>Tompkins codes I and II (1956)<sup id="cite_ref-Tompkins_1956_2-1" class="reference"><a href="#cite_note-Tompkins_1956-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-1" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-1" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1973_91-3" class="reference"><a href="#cite_note-Dokter-Steinhauer_1973-91"><span class="cite-bracket">[</span>89<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1975_92-3" class="reference"><a href="#cite_note-Dokter-Steinhauer_1975-92"><span class="cite-bracket">[</span>90<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_1_106-4" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup></li>
<li>Glixon code (1957), sometimes ambiguously also called modified Gray code<sup id="cite_ref-Glixon_1957_127-0" class="reference"><a href="#cite_note-Glixon_1957-127"><span class="cite-bracket">[</span>122<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Powell_1968_54-3" class="reference"><a href="#cite_note-Powell_1968-54"><span class="cite-bracket">[</span>53<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Borucki-Dittmann_1971_128-0" class="reference"><a href="#cite_note-Borucki-Dittmann_1971-128"><span class="cite-bracket">[</span>123<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Kämmerer_1969_129-0" class="reference"><a href="#cite_note-Kämmerer_1969-129"><span class="cite-bracket">[</span>124<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-2" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-2" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1973_91-4" class="reference"><a href="#cite_note-Dokter-Steinhauer_1973-91"><span class="cite-bracket">[</span>89<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Dokter-Steinhauer_1975_92-4" class="reference"><a href="#cite_note-Dokter-Steinhauer_1975-92"><span class="cite-bracket">[</span>90<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_1_106-5" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Modified_99-2" class="reference"><a href="#cite_note-NB_Modified-99"><span class="cite-bracket">[</span>nb 3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_OBrien-I_Glixon_116-1" class="reference"><a href="#cite_note-NB_OBrien-I_Glixon-116"><span class="cite-bracket">[</span>nb 5<span class="cite-bracket">]</span></a></sup></li></ul>
<table class="wikitable" style="text-align:center;">
<caption>4-bit unit-distance BCD codes<sup id="cite_ref-NB_Other_codes_130-0" class="reference"><a href="#cite_note-NB_Other_codes-130"><span class="cite-bracket">[</span>nb 6<span class="cite-bracket">]</span></a></sup>
</caption>
<tbody><tr>
<td><b>Name</b></td>
<td><b>Bit</b></td>
<td style="background:lightgray;width:1em">0</td>
<td style="background:lightgray;width:1em">1</td>
<td style="background:lightgray;width:1em">2</td>
<td style="background:lightgray;width:1em">3</td>
<td style="background:lightgray;width:1em">4</td>
<td style="background:lightgray;width:1em">5</td>
<td style="background:lightgray;width:1em">6</td>
<td style="background:lightgray;width:1em">7</td>
<td style="background:lightgray;width:1em">8</td>
<td style="background:lightgray;width:1em">9</td>
<td><a href="Hamming_weight" title="Hamming weight"><b>Weights</b></a><sup id="cite_ref-NB_Weights_131-0" class="reference"><a href="#cite_note-NB_Weights-131"><span class="cite-bracket">[</span>nb 7<span class="cite-bracket">]</span></a></sup></td>
<td><b>Tracks</b></td>
<td><a href="Method_of_complements" title="Method of complements"><b>Compl.</b></a></td>
<td><b>Cyclic</b></td>
<td><b>5s</b></td>
<td><b>Comment</b>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Gray&nbsp;BCD</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">0–3</td>
<td rowspan="4">4 (3<sup id="cite_ref-NB_Tracks_Inverse_132-0" class="reference"><a href="#cite_note-NB_Tracks_Inverse-132"><span class="cite-bracket">[</span>nb 8<span class="cite-bracket">]</span></a></sup>)</td>
<td rowspan="4">No</td>
<td rowspan="4">(2, 4, 8, 16)</td>
<td rowspan="4">No</td>
<td rowspan="4"><sup id="cite_ref-Steinbuch_1962_114-3" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-3" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Paul</b></td>
<td style="background:lightgray"><b>4</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">1–3</td>
<td rowspan="4">4 (3<sup id="cite_ref-NB_Tracks_Inverse_132-1" class="reference"><a href="#cite_note-NB_Tracks_Inverse-132"><span class="cite-bracket">[</span>nb 8<span class="cite-bracket">]</span></a></sup>)</td>
<td rowspan="4">No</td>
<td rowspan="4">2, 10</td>
<td rowspan="4">No</td>
<td rowspan="4"><sup id="cite_ref-Paul_1995_133-0" class="reference"><a href="#cite_note-Paul_1995-133"><span class="cite-bracket">[</span>125<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Glixon</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">0–3</td>
<td rowspan="4">4</td>
<td rowspan="4">No</td>
<td rowspan="4">2, 4, 8, 10</td>
<td rowspan="4">(shifted +1)</td>
<td rowspan="4"><sup id="cite_ref-Glixon_1957_127-1" class="reference"><a href="#cite_note-Glixon_1957-127"><span class="cite-bracket">[</span>122<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-4" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-4" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Borucki-Dittmann_1971_128-1" class="reference"><a href="#cite_note-Borucki-Dittmann_1971-128"><span class="cite-bracket">[</span>123<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Kämmerer_1969_129-1" class="reference"><a href="#cite_note-Kämmerer_1969-129"><span class="cite-bracket">[</span>124<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_OBrien-I_Glixon_116-2" class="reference"><a href="#cite_note-NB_OBrien-I_Glixon-116"><span class="cite-bracket">[</span>nb 5<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Tompkins&nbsp;I</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">0–4</td>
<td rowspan="4">2</td>
<td rowspan="4">No</td>
<td rowspan="4">2, 4, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-Tompkins_1956_2-2" class="reference"><a href="#cite_note-Tompkins_1956-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-5" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-5" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>O'Brien&nbsp;I</b> <b>(Watts)</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">0–3</td>
<td rowspan="4">4</td>
<td rowspan="4">9<sup id="cite_ref-Hoklas_2005_1_106-6" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_2_107-1" class="reference"><a href="#cite_note-Hoklas_2005_2-107"><span class="cite-bracket">[</span>104<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Complement_InvertTop_134-0" class="reference"><a href="#cite_note-NB_Complement_InvertTop-134"><span class="cite-bracket">[</span>nb 9<span class="cite-bracket">]</span></a></sup></td>
<td rowspan="4">2, 4, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-O'Brien_1955_113-1" class="reference"><a href="#cite_note-O'Brien_1955-113"><span class="cite-bracket">[</span>109<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-6" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-6" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_OBrien-I_Glixon_116-3" class="reference"><a href="#cite_note-NB_OBrien-I_Glixon-116"><span class="cite-bracket">[</span>nb 5<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Petherick</b> <b>(RAE)</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">1–3</td>
<td rowspan="4">3</td>
<td rowspan="4">9<sup id="cite_ref-Hoklas_2005_1_106-7" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_2_107-2" class="reference"><a href="#cite_note-Hoklas_2005_2-107"><span class="cite-bracket">[</span>104<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Complement_InvertTop_134-1" class="reference"><a href="#cite_note-NB_Complement_InvertTop-134"><span class="cite-bracket">[</span>nb 9<span class="cite-bracket">]</span></a></sup></td>
<td rowspan="4">2, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-Petherick_1953_17-2" class="reference"><a href="#cite_note-Petherick_1953-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Charnley-Bidgood-Boardman_1965_110-1" class="reference"><a href="#cite_note-Charnley-Bidgood-Boardman_1965-110"><span class="cite-bracket">[</span>107<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Petherick_OBrien-II_111-2" class="reference"><a href="#cite_note-NB_Petherick_OBrien-II-111"><span class="cite-bracket">[</span>nb 4<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>O'Brien&nbsp;II</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">1–3</td>
<td rowspan="4">3</td>
<td rowspan="4">9<sup id="cite_ref-Dokter-Steinhauer_1973_91-5" class="reference"><a href="#cite_note-Dokter-Steinhauer_1973-91"><span class="cite-bracket">[</span>89<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_1_106-8" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_2_107-3" class="reference"><a href="#cite_note-Hoklas_2005_2-107"><span class="cite-bracket">[</span>104<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Complement_InvertTop_134-2" class="reference"><a href="#cite_note-NB_Complement_InvertTop-134"><span class="cite-bracket">[</span>nb 9<span class="cite-bracket">]</span></a></sup></td>
<td rowspan="4">2, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-O'Brien_1955_113-2" class="reference"><a href="#cite_note-O'Brien_1955-113"><span class="cite-bracket">[</span>109<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-7" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-7" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Petherick_OBrien-II_111-3" class="reference"><a href="#cite_note-NB_Petherick_OBrien-II-111"><span class="cite-bracket">[</span>nb 4<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Susskind</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">1–4</td>
<td rowspan="4">3</td>
<td rowspan="4">9<sup id="cite_ref-NB_Complement_InvertTop_134-3" class="reference"><a href="#cite_note-NB_Complement_InvertTop-134"><span class="cite-bracket">[</span>nb 9<span class="cite-bracket">]</span></a></sup></td>
<td rowspan="4">2, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-Susskind_1958_4-1" class="reference"><a href="#cite_note-Susskind_1958-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Klar</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">0–4</td>
<td rowspan="4">4 (3<sup id="cite_ref-NB_Tracks_Inverse_132-2" class="reference"><a href="#cite_note-NB_Tracks_Inverse-132"><span class="cite-bracket">[</span>nb 8<span class="cite-bracket">]</span></a></sup>)</td>
<td rowspan="4">9<sup id="cite_ref-NB_Complement_InvertTop_134-4" class="reference"><a href="#cite_note-NB_Complement_InvertTop-134"><span class="cite-bracket">[</span>nb 9<span class="cite-bracket">]</span></a></sup></td>
<td rowspan="4">2, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-Klar_1970_135-0" class="reference"><a href="#cite_note-Klar_1970-135"><span class="cite-bracket">[</span>126<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Klar_1989_136-0" class="reference"><a href="#cite_note-Klar_1989-136"><span class="cite-bracket">[</span>127<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><b>Tompkins&nbsp;II</b></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">1–3</td>
<td rowspan="4">2</td>
<td rowspan="4">9<sup id="cite_ref-NB_Complement_Tompkins_137-0" class="reference"><a href="#cite_note-NB_Complement_Tompkins-137"><span class="cite-bracket">[</span>nb 10<span class="cite-bracket">]</span></a></sup></td>
<td rowspan="4">2, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-Tompkins_1956_2-3" class="reference"><a href="#cite_note-Tompkins_1956-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch_1962_114-8" class="reference"><a href="#cite_note-Steinbuch_1962-114"><span class="cite-bracket">[</span>110<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Steinbuch-Weber-Heinemann_1974_115-8" class="reference"><a href="#cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="cite-bracket">[</span>111<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td colspan="18">
</td></tr>
<tr>
<td rowspan="4"><span class="nowrap"><b>Excess-3 Gray</b></span></td>
<td style="background:lightgray"><b>4</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td rowspan="4">1–4</td>
<td rowspan="4">4</td>
<td rowspan="4">9<sup id="cite_ref-Hoklas_2005_1_106-9" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_2_107-4" class="reference"><a href="#cite_note-Hoklas_2005_2-107"><span class="cite-bracket">[</span>104<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-NB_Complement_InvertTop_134-5" class="reference"><a href="#cite_note-NB_Complement_InvertTop-134"><span class="cite-bracket">[</span>nb 9<span class="cite-bracket">]</span></a></sup></td>
<td rowspan="4">2, 10</td>
<td rowspan="4">Yes</td>
<td rowspan="4"><sup id="cite_ref-MIL_1991_6-5" class="reference"><a href="#cite_note-MIL_1991-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Hoklas_2005_1_106-10" class="reference"><a href="#cite_note-Hoklas_2005_1-106"><span class="cite-bracket">[</span>103<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="background:lightgray"><b>3</b></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>2</b></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span>
</td></tr>
<tr>
<td style="background:lightgray"><b>1</b></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td style="background:#0FF"><span class="monospaced">1</span></td>
<td><span class="monospaced">0</span></td>
<td><span class="monospaced">0</span>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Linear-feedback_shift_register" title="Linear-feedback shift register">Linear-feedback shift register</a></li>
<li><a href="De_Bruijn_sequence" title="De Bruijn sequence">De Bruijn sequence</a></li>
<li><a href="Steinhaus%E2%80%93Johnson%E2%80%93Trotter_algorithm" title="Steinhaus–Johnson–Trotter algorithm">Steinhaus–Johnson–Trotter algorithm</a> – an algorithm that generates Gray codes for the <a href="Factorial_number_system" title="Factorial number system">factorial number system</a></li>
<li><a href="Decoding_methods#Minimum_distance_decoding" title="Decoding methods">Minimum distance code</a></li>
<li><a href="Prouhet%E2%80%93Thue%E2%80%93Morse_sequence" class="mw-redirect" title="Prouhet–Thue–Morse sequence">Prouhet–Thue–Morse sequence</a> – related to inverse Gray code</li>
<li><a href="Ryser_formula" class="mw-redirect" title="Ryser formula">Ryser formula</a></li>
<li><a href="Hilbert_curve" title="Hilbert curve">Hilbert curve</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-NB_Arithmetic_conversion-52"><span class="mw-cite-backlink">^ <a href="#cite_ref-NB_Arithmetic_conversion_52-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-NB_Arithmetic_conversion_52-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-NB_Arithmetic_conversion_52-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text">By applying a simple <i>inversion rule</i>, the Gray code and the <a href="#O'Brien_I">O'Brien code I</a> can be translated into the 8421 <a href="Pure_binary_code" class="mw-redirect" title="Pure binary code">pure binary code</a> and the 2421 <a href="Aiken_code" title="Aiken code">Aiken code</a>, respectively, to ease arithmetic operations.<sup><a href="#CITEREFEvans1961">[C]</a></sup></span>
</li>
<li id="cite_note-NB_OEIS_A007814-59"><span class="mw-cite-backlink"><b><a href="#cite_ref-NB_OEIS_A007814_59-0">^</a></b></span> <span class="reference-text">Sequence 0, 1, 0, 2, 0, 1, 0, 3, … (sequence <span class="nowrap external"><a href="https://oeis.org/A007814" class="extiw external" title="oeis:A007814">A007814</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</span>
</li>
<li id="cite_note-NB_Modified-99"><span class="mw-cite-backlink">^ <a href="#cite_ref-NB_Modified_99-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-NB_Modified_99-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-NB_Modified_99-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text">There are several Gray code variants which are called "modified" of some sort: The <a href="#Glixon">Glixon code</a> is sometimes called modified Gray code.<sup><a href="#CITEREFPowell1968">[D]</a></sup> The <a href="#Lucal">Lucal code</a> is also called modified reflected binary code (MRB).<sup><a href="#CITEREFSellers,_Jr.HsiaoBearnson1968">[E]</a></sup> The <a href="#O'Brien_I">O'Brien code I</a> or Watts code is sometimes referred to as reflected binary modified Gray code.<sup><a href="#CITEREFSavard2018">[F]</a></sup></span>
</li>
<li id="cite_note-NB_Petherick_OBrien-II-111"><span class="mw-cite-backlink">^ <a href="#cite_ref-NB_Petherick_OBrien-II_111-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-NB_Petherick_OBrien-II_111-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-NB_Petherick_OBrien-II_111-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-NB_Petherick_OBrien-II_111-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text">By interchanging and inverting three bit rows, the <a href="#O'Brien_II">O'Brien code II</a> and the <a href="#Petherick">Petherick code</a> can be transferred into each other.</span>
</li>
<li id="cite_note-NB_OBrien-I_Glixon-116"><span class="mw-cite-backlink">^ <a href="#cite_ref-NB_OBrien-I_Glixon_116-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-NB_OBrien-I_Glixon_116-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-NB_OBrien-I_Glixon_116-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-NB_OBrien-I_Glixon_116-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text">By swapping two pairs of bit rows, individually shifting four bit rows and inverting one of them, the <a href="#Glixon">Glixon code</a> and the <a href="#O'Brien_I">O'Brien code I</a> can be transferred into each other.</span>
</li>
<li id="cite_note-NB_Other_codes-130"><span class="mw-cite-backlink"><b><a href="#cite_ref-NB_Other_codes_130-0">^</a></b></span> <span class="reference-text">Other unit-distance BCD codes include the non-Gray code related 5-bit <a href="Libaw%E2%80%93Craig_code" class="mw-redirect" title="Libaw–Craig code">Libaw–Craig</a> and the <a href="1-2-1_code" class="mw-redirect" title="1-2-1 code">1-2-1 code</a>.</span>
</li>
<li id="cite_note-NB_Weights-131"><span class="mw-cite-backlink"><b><a href="#cite_ref-NB_Weights_131-0">^</a></b></span> <span class="reference-text">Depending on a code's target application, the <a href="Hamming_weight" title="Hamming weight">Hamming weights</a> of a code can be important properties beyond coding-theoretical considerations also for physical reasons. Under some circumstances the all-cleared and/or all-set states must be omitted (f.e. to avoid non-conductive or short-circuit conditions), it may be desirable to keep the highest used weight as low as possible (f.e. to reduce power consumption of the reader circuit) or to keep the variance of used weights small (f.e. to reduce acoustic noise or current fluctuations).</span>
</li>
<li id="cite_note-NB_Tracks_Inverse-132"><span class="mw-cite-backlink">^ <a href="#cite_ref-NB_Tracks_Inverse_132-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-NB_Tracks_Inverse_132-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-NB_Tracks_Inverse_132-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text">For <a href="#Gray_BCD">Gray BCD</a>, <a href="#Paul">Paul</a> and <a href="#Klar">Klar codes</a>, the number of necessary reading tracks can be reduced from 4 to 3 if inversion of one of the middle tracks is acceptable.</span>
</li>
<li id="cite_note-NB_Complement_InvertTop-134"><span class="mw-cite-backlink">^ <a href="#cite_ref-NB_Complement_InvertTop_134-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-NB_Complement_InvertTop_134-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-NB_Complement_InvertTop_134-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-NB_Complement_InvertTop_134-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-NB_Complement_InvertTop_134-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-NB_Complement_InvertTop_134-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text">For <a href="#O'Brien_I">O'Brien codes I</a> and <a href="#O'Brien_II">II</a> and <a href="#Petherick">Petherick</a>, <a href="#Susskind">Susskind</a>, <a href="#Klar">Klar</a> as well as <a href="#Gray_excess">Excess-3 Gray codes</a>, a <a href="9s_complement" class="mw-redirect" title="9s complement">9s complement</a> can be derived by inverting the most-significant (fourth) binary digit.</span>
</li>
<li id="cite_note-NB_Complement_Tompkins-137"><span class="mw-cite-backlink"><b><a href="#cite_ref-NB_Complement_Tompkins_137-0">^</a></b></span> <span class="reference-text">For <a href="#Tompkins_II">Tompkins code II</a>, a <a href="9s_complement" class="mw-redirect" title="9s complement">9s complement</a> can be derived by inverting the first three digits and swapping the two middle binary digits.</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFGray2020" class="citation web cs1">Gray, Joel (March 2020). <a rel="nofollow" class="external text" href="https://graycode.ie/blog/graycode/">"Understanding Gray Code: A Reliable Encoding System"</a>. <i>graycode.ie</i>. Section: Conclusion<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-06-30</span></span>.</cite></span>
</li>
<li id="cite_note-Tompkins_1956-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-Tompkins_1956_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Tompkins_1956_2-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Tompkins_1956_2-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Tompkins_1956_2-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFTompkins1956" class="citation journal cs1">Tompkins, Howard E. (September 1956) [1956-07-16]. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200518083051/https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html">"Unit-Distance Binary-Decimal Codes for Two-Track Commutation"</a>. <i><a href="IRE_Transactions_on_Electronic_Computers" class="mw-redirect" title="IRE Transactions on Electronic Computers">IRE Transactions on Electronic Computers</a></i>. Correspondence. <b>EC-5</b> (3). <a href="Moore_School_of_Electrical_Engineering" title="Moore School of Electrical Engineering">Moore School of Electrical Engineering</a>, <a href="University_of_Pennsylvania" title="University of Pennsylvania">University of Pennsylvania</a>, Philadelphia, Pennsylvania, USA: 139. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTEC.1956.5219934">10.1109/TEC.1956.5219934</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0367-9950">0367-9950</a>. Archived from <a rel="nofollow" class="external text" href="https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html">the original</a> on 2020-05-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-18</span></span>.</cite> (1 page)</span>
</li>
<li id="cite_note-Kautz_1958-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-Kautz_1958_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Kautz_1958_3-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFKautz1958" class="citation journal cs1"><a href="William_H._Kautz" class="mw-redirect" title="William H. Kautz">Kautz, William H.</a> (June 1958). "Unit-Distance Error-Checking Codes". <i><a href="IRE_Transactions_on_Electronic_Computers" class="mw-redirect" title="IRE Transactions on Electronic Computers">IRE Transactions on Electronic Computers</a></i>. <b>EC-7</b> (2): <span class="nowrap">179–</span>180. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTEC.1958.5222529">10.1109/TEC.1958.5222529</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0367-9950">0367-9950</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:26649532">26649532</a>.</cite> (2 pages)</span>
</li>
<li id="cite_note-Susskind_1958-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-Susskind_1958_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Susskind_1958_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFSusskindWard1958" class="citation book cs1 cs1-prop-location-test">Susskind, Alfred Kriss; Ward, John Erwin (1958-03-28) [1957, 1956]. "III.F. Unit-Distance Codes / VI.E.2. Reflected Binary Codes". Written at Cambridge, Massachusetts, USA. In Susskind, Alfred Kriss (ed.). <i>Notes on Analog-Digital Conversion Techniques</i>. Technology Books in Science and Engineering. Vol.&nbsp;1 (3&nbsp;ed.). New York, USA: <a href="Technology_Press_of_the_Massachusetts_Institute_of_Technology" class="mw-redirect" title="Technology Press of the Massachusetts Institute of Technology">Technology Press of the Massachusetts Institute of Technology</a> / <a href="John_Wiley_%26_Sons%2C_Inc." class="mw-redirect" title="John Wiley &amp; Sons, Inc.">John Wiley &amp; Sons, Inc.</a> / <a href="Chapman_%26_Hall%2C_Ltd." class="mw-redirect" title="Chapman &amp; Hall, Ltd.">Chapman &amp; Hall, Ltd.</a> pp.&nbsp;3-10–3-16 [3-13–3-16], 6-65–6-60 [6-60].</cite> (x+416+2 pages) (NB. The contents of the book was originally prepared by staff members of the <a href="MIT_Servomechanisms_Laboratory" class="mw-redirect" title="MIT Servomechanisms Laboratory">Servomechanisms Laboraratory</a>, Department of Electrical Engineering, <a href="Massachusetts_Institute_of_Technology" title="Massachusetts Institute of Technology">MIT</a>, for Special Summer Programs held in 1956 and 1957. Susskind's "reading-type code" is actually a minor variant of the code shown here with the two most significant bit rows swapped to better illustrate symmetries. Also, by swapping two bit rows and inverting one of them, the code can be transferred into the <a href="#Petherick">Petherick code</a>, whereas by swapping and inverting two bit rows, the code can be transferred into the <a href="#O'Brien_II">O'Brien code II</a>.)</span>
</li>
<li id="cite_note-Chinal_1973-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-Chinal_1973_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Chinal_1973_5-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFChinal1973" class="citation book cs1 cs1-prop-location-test">Chinal, Jean P. (January 1973). "3.3. Unit Distance Codes". Written at Paris, France. <a rel="nofollow" class="external text" href="https://books.google.com/books?id=8FnxCAAAQBAJ"><i>Design Methods for Digital Systems</i></a>. Translated by Preston, Alan; Summer, Arthur (1st English&nbsp;ed.). Berlin, Germany: <a href="Akademie-Verlag" class="mw-redirect" title="Akademie-Verlag">Akademie-Verlag</a> / <a href="Springer-Verlag" class="mw-redirect" title="Springer-Verlag">Springer-Verlag</a>. p.&nbsp;50. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-642-86187-1">10.1007/978-3-642-86187-1</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-387-05871-9</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:60362404">60362404</a>. License No. 202-100/542/73. Order No. 7617470(6047) ES 19 B 1 / 20 K 3<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-06-21</span></span>.</cite> (xviii+506 pages) (NB. The French 1967 original book was named "Techniques Booléennes et Calculateurs Arithmétiques", published by <a href="%C3%89ditions_Dunod" class="mw-redirect" title="Éditions Dunod">Éditions Dunod</a>.)</span>
</li>
<li id="cite_note-MIL_1991-6"><span class="mw-cite-backlink">^ <a href="#cite_ref-MIL_1991_6-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-MIL_1991_6-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-MIL_1991_6-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-MIL_1991_6-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-MIL_1991_6-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-MIL_1991_6-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite class="citation book cs1"><a rel="nofollow" class="external text" href="http://everyspec.com/MIL-HDBK/MIL-HDBK-0200-0299/download.php?spec=MIL_HDBK_231A.1809.pdf"><i>Military Handbook: Encoders – Shaft Angle To Digital</i></a> <span class="cs1-format">(PDF)</span>. <a href="United_States_Department_of_Defense" title="United States Department of Defense">United States Department of Defense</a>. 1991-09-30. MIL-HDBK-231A. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200725051128/http://everyspec.com/MIL-HDBK/MIL-HDBK-0200-0299/download.php?spec=MIL_HDBK_231A.1809.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-07-25<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-07-25</span></span>.</cite> (NB. Supersedes MIL-HDBK-231(AS) (1970-07-01).)</span>
</li>
<li id="cite_note-Spaulding_1954-7"><span class="mw-cite-backlink">^ <a href="#cite_ref-Spaulding_1954_7-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Spaulding_1954_7-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Spaulding_1954_7-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFSpaulding1965a" class="citation web cs1">Spaulding, Carl P. (1965-01-12) [1954-03-09]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/7f/1d/09/6a9b1fa3e67cb8/US3165731.pdf">"Digital coding and translating system"</a> <span class="cs1-format">(PDF)</span>. Monrovia, California, USA: Datex Corporation. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US3165731A">U.S. patent 3165731A</a></span>. Serial No. 415058. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200805101618/https://patentimages.storage.googleapis.com/7f/1d/09/6a9b1fa3e67cb8/US3165731.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-08-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-21</span></span>.</cite> (28 pages)</span>
</li>
<li id="cite_note-Russell_1964-8"><span class="mw-cite-backlink">^ <a href="#cite_ref-Russell_1964_8-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Russell_1964_8-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFRussell1964" class="citation journal cs1">Russell, A. (August 1964). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=jf4eAAAAMAAJ">"Some Binary Codes and a Novel Five-Channel Code"</a>. <i>Control (Systems, Instrumentation, Data Processing, Automation, Management, incorporating Automation Progress)</i>. Special Features. <b>8</b> (74). London, UK: Morgan-Grampain (Publishers) Limited: <span class="nowrap">399–</span>404<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-06-22</span></span>.</cite> (6 pages)</span>
</li>
<li id="cite_note-Stibitz_1941-9"><span class="mw-cite-backlink">^ <a href="#cite_ref-Stibitz_1941_9-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Stibitz_1941_9-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Stibitz_1941_9-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFStibitz1943" class="citation web cs1"><a href="George_Robert_Stibitz" class="mw-redirect" title="George Robert Stibitz">Stibitz, George Robert</a> (1943-01-12) [1941-11-26]. <a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2307868?oq=US2307868">"Binary counter"</a>. New York, USA: <a href="Bell_Telephone_Laboratories%2C_Incorporated" class="mw-redirect" title="Bell Telephone Laboratories, Incorporated">Bell Telephone Laboratories, Incorporated</a>. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2307868">U.S. patent 2,307,868</a></span>. Serial No. 420537<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-24</span></span>. p.&nbsp;2, right column, rows 43–73: <q>[…] A clearer idea of the position of the balls after each pulse will be obtained if the set of balls is represented by a number having a similar number of digits, each of which may have one of two arbitrary values, for example 0 and 1. If the upper position is called 0 and the lower position […] 1, then the setting of the counter […] may be read from left to right as 0,100,000. […] Following is a translation of the number of pulses received into this form of binary notation for the first sixteen pulses as received on the first five balls […] Pulse number […] Binary notation […]</q></cite> <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20201217181617/https://patentimages.storage.googleapis.com/51/a5/54/f2f6faf23da3fb/US2307868.pdf">[1]</a> (4 pages)</span>
</li>
<li id="cite_note-Winder_1959-10"><span class="mw-cite-backlink">^ <a href="#cite_ref-Winder_1959_10-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Winder_1959_10-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Winder_1959_10-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Winder_1959_10-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Winder_1959_10-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWinder1959" class="citation journal cs1">Winder, C. Farrell (October 1959). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200928132232/https://worldradiohistory.com/Archive-Tele-Tech/50s/Electronic-Industries-1959-10.pdf">"Shaft Angle Encoders Afford High Accuracy"</a> <span class="cs1-format">(PDF)</span>. <i><a href="Electronic_Industries_(journal)" class="mw-redirect" title="Electronic Industries (journal)">Electronic Industries</a></i>. <b>18</b> (10). <a href="Chilton_Company" title="Chilton Company">Chilton Company</a>: <span class="nowrap">76–</span>80. Archived from <a rel="nofollow" class="external text" href="https://worldradiohistory.com/Archive-Tele-Tech/50s/Electronic-Industries-1959-10.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2020-09-28<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-14</span></span>. p.&nbsp;78: <q>[…] The type of code wheel most popular in <a href="Optical_encoder" class="mw-redirect" title="Optical encoder">optical encoders</a> contains a cyclic binary code pattern designed to give a cyclic sequence of "on-off" outputs. The cyclic binary code is also known as the cyclic progression code, the reflected binary code, and the Gray code. This code was originated by <a href="G._R._Stibitz" class="mw-redirect" title="G. R. Stibitz">G. R. Stibitz</a>, of <a href="Bell_Telephone_Laboratories" class="mw-redirect" title="Bell Telephone Laboratories">Bell Telephone Laboratories</a>, and was first proposed for <a href="Pulse-code_modulation" title="Pulse-code modulation">pulse-code modulation</a> systems by <a href="Frank_Gray_(researcher)" title="Frank Gray (researcher)">Frank Gray</a>, also of BTL. Thus the name Gray code. The Gray or cyclic code is used mainly to eliminate the possibility of errors at code transition which could result in gross ambiguities. […]</q></cite></span>
</li>
<li id="cite_note-Knuth_2014-11"><span class="mw-cite-backlink">^ <a href="#cite_ref-Knuth_2014_11-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-Knuth_2014_11-8"><sup><i><b>i</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFKnuth2014" class="citation book cs1"><a href="Donald_Ervin_Knuth" class="mw-redirect" title="Donald Ervin Knuth">Knuth, Donald Ervin</a> (2014-09-12). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=IkuEBAAAQBAJ">"Enumeration and Backtracking / Generating all <i>n</i>-tuples"</a>. <a href="The_Art_of_Computer_Programming" title="The Art of Computer Programming"><i>The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1</i></a>. Vol.&nbsp;4A (1&nbsp;ed.). <a href="Addison-Wesley_Professional" class="mw-redirect" title="Addison-Wesley Professional">Addison-Wesley Professional</a>. pp.&nbsp;<span class="nowrap">442–</span>443. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-13348885-2</bdi>.</cite> (912 pages)</span>
</li>
<li id="cite_note-Gray_1947-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-Gray_1947_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Gray_1947_12-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGray1953" class="citation book cs1"><a href="Frank_Gray_(researcher)" title="Frank Gray (researcher)">Gray, Frank</a> (1953-03-17) [1947-11-13]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/a3/d7/f2/0343f5f2c0cf50/US2632058.pdf"><i>Pulse Code Communication</i></a> <span class="cs1-format">(PDF)</span>. New York, USA: <a href="Bell_Telephone_Laboratories%2C_Incorporated" class="mw-redirect" title="Bell Telephone Laboratories, Incorporated">Bell Telephone Laboratories, Incorporated</a>. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2632058">U.S. patent 2,632,058</a></span>. Serial No. 785697. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200805094312/https://patentimages.storage.googleapis.com/a3/d7/f2/0343f5f2c0cf50/US2632058.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-08-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-08-05</span></span>.</cite> (13 pages)</span>
</li>
<li id="cite_note-Goldberg_1989-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-Goldberg_1989_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Goldberg_1989_13-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGoldberg1989" class="citation book cs1"><a href="David_Edward_Goldberg" class="mw-redirect" title="David Edward Goldberg">Goldberg, David Edward</a> (1989). <i>Genetic Algorithms in Search, Optimization, and Machine Learning</i> (1&nbsp;ed.). Reading, Massachusetts, USA: <a href="Addison-Wesley" title="Addison-Wesley">Addison-Wesley</a>. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1989gaso.book.....G">1989gaso.book.....G</a>.</cite></span>
</li>
<li id="cite_note-Breckman_1953-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-Breckman_1953_14-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBreckman1956" class="citation book cs1">Breckman, Jack (1956-01-31) [1953-12-31]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/46/90/d6/2ed9fb7a77e643/US2733432.pdf"><i>Encoding Circuit</i></a> <span class="cs1-format">(PDF)</span>. Long Branch, New Jersey, USA: <a href="US_Secretary_of_the_Army" class="mw-redirect" title="US Secretary of the Army">US Secretary of the Army</a>. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2733432">U.S. patent 2,733,432</a></span>. Serial No. 401738. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200805094857/https://patentimages.storage.googleapis.com/46/90/d6/2ed9fb7a77e643/US2733432.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-08-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-08-05</span></span>.</cite> (8 pages)</span>
</li>
<li id="cite_note-Ragland-Schultheis_1953-15"><span class="mw-cite-backlink">^ <a href="#cite_ref-Ragland-Schultheis_1953_15-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Ragland-Schultheis_1953_15-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFRaglandSchultheis,_Jr.1958" class="citation book cs1">Ragland, Earl Albert; Schultheis, Jr., Harry B. (1958-02-11) [1953-10-16]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/ad/74/b1/2b0aa965d0c1df/US2823345.pdf"><i>Direction-Sensitive Binary Code Position Control System</i></a> <span class="cs1-format">(PDF)</span>. North Hollywood, California, USA: Bendix Aviation Corporation. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2823345">U.S. patent 2,823,345</a></span>. Serial No. 386524. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200805095445/https://patentimages.storage.googleapis.com/ad/74/b1/2b0aa965d0c1df/US2823345.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-08-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-08-05</span></span>.</cite> (10 pages)</span>
</li>
<li id="cite_note-Domeshek-Reiner_1954-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-Domeshek-Reiner_1954_16-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFDomeshekReiner1958" class="citation book cs1">Domeshek, Sol; Reiner, Stewart (1958-06-24) [1954-01-08]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/9d/bf/65/e676a661e1217e/US2839974.pdf"><i>Automatic Rectification System</i></a> <span class="cs1-format">(PDF)</span>. <a href="US_Secretary_of_the_Navy" class="mw-redirect" title="US Secretary of the Navy">US Secretary of the Navy</a>. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2839974">U.S. patent 2,839,974</a></span>. Serial No. 403085. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200805100327/https://patentimages.storage.googleapis.com/9d/bf/65/e676a661e1217e/US2839974.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-08-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-08-05</span></span>.</cite> (8 pages)</span>
</li>
<li id="cite_note-Petherick_1953-17"><span class="mw-cite-backlink">^ <a href="#cite_ref-Petherick_1953_17-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Petherick_1953_17-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Petherick_1953_17-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFPetherick1953" class="citation book cs1">Petherick, Edward John (October 1953). <i>A Cyclic Progressive Binary-coded-decimal System of Representing Numbers</i> (Technical Note MS15). Farnborough, UK: <a href="Royal_Aircraft_Establishment" title="Royal Aircraft Establishment">Royal Aircraft Establishment</a> (RAE).</cite> (4 pages) (NB. Sometimes referred to as <i>A Cyclic-Coded Binary-Coded-Decimal System of Representing Numbers</i>.)</span>
</li>
<li id="cite_note-Evans_1960-18"><span class="mw-cite-backlink">^ <a href="#cite_ref-Evans_1960_18-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Evans_1960_18-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFEvans1960" class="citation book cs1">Evans, David Silvester (1960). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=gpVNAAAAYAAJ"><i>Fundamentals of Digital Instrumentation</i></a> (1&nbsp;ed.). London, UK: <a href="Hilger_%26_Watts_Ltd" class="mw-redirect" title="Hilger &amp; Watts Ltd">Hilger &amp; Watts Ltd</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-24</span></span>.</cite> (39 pages)</span>
</li>
<li id="cite_note-Evans_1961-19"><span class="mw-cite-backlink">^ <a href="#cite_ref-Evans_1961_19-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Evans_1961_19-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFEvans1961" class="citation book cs1">Evans, David Silvester (March 1961). "Chapter Three: Direct Reading from Coded Scales". <a rel="nofollow" class="external text" href="https://books.google.com/books?id=WOIJAAAAMAAJ"><i>Digital Data: Their derivation and reduction for analysis and process control</i></a> (1&nbsp;ed.). London, UK: <a href="Hilger_%26_Watts_Ltd" class="mw-redirect" title="Hilger &amp; Watts Ltd">Hilger &amp; Watts Ltd</a> / <a href="Interscience_Publishers" class="mw-redirect" title="Interscience Publishers">Interscience Publishers</a>. pp.&nbsp;<span class="nowrap">18–</span>23<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-24</span></span>. p.&nbsp;20–23: <q>[…] Decoding. […] To decode C.P.B. or <a href="#Watts">W.R.D.</a> codes, a simple inversion rule can be applied. The readings of the higher tracks determine the way in which the lower tracks are translated. The inversion rule is applied line by line for the C.P.B. and for the W.R.D. it is applied decade by decade or line by line. Starting therefore with the top or slowest changing track of the C.P.B., if the result is odd (1) the next track value has to be inverted, i.e. 0 for 1 and 1 for 0. If, however, the first track is even (0), the second track is left as read, i.e. 0 for 0 and 1 for 1. Again, if the resultant reading of the second track is odd, the third track reading is inverted and so on. When an odd is changed to an even the line below is not inverted and when an even is changed to an odd the line below is inverted. The result of applying this rule to the pattern […] is the <a href="Pure_binary_code" class="mw-redirect" title="Pure binary code">pure binary</a> (P.B.) pattern […] where each track or digit can be given a definite numerical value (in this instance 1, 2, 4, 8, etc.). […] Using the line-by-line inversion rule on the W.R.D. code produces [a] pattern [of <a href="Aiken_code" title="Aiken code">1, 2, 4, 2 code</a>] where again the digits can be given numerical values and summed decade by decade. The summing of the digits can be very useful, for example, in a high-speed scanning system; but in a parallel decoding system […], it is usual to treat each binary quartet or decade as an entity. In other words, if the first or more significant decade is odd, the second decade is rectified or complemented by inverting the D track and so on, the result being the repeating pattern of [rectified W.R.D. code]. This is an extremely easy thing to achieve since the only change required is the inversion of the meaning of the D track or complementing digit. […]</q></cite> (8+82 pages) (NB. The author does not mention Gray at all and calls the standard Gray code "Cyclic Permuted Binary Code" (C.P.B.), the book index erroneously lists it as "cyclic pure binary code".)</span>
</li>
<li id="cite_note-Newson_1965-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-Newson_1965_20-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFNewson1965" class="citation book cs1">Newson, P. A. (1965). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=aUEgAQAAIAAJ"><i>Tables for the Binary Encoding of Angles</i></a> (1&nbsp;ed.). <a href="United_Kingdom_Atomic_Energy_Authority" title="United Kingdom Atomic Energy Authority">United Kingdom Atomic Energy Authority</a>, Research Group, <a href="Atomic_Energy_Research_Establishment" title="Atomic Energy Research Establishment">Atomic Energy Research Establishment</a>, Harwell, UK: <a href="H._M._Stationery_Office" class="mw-redirect" title="H. M. Stationery Office">H. M. Stationery Office</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-24</span></span>.</cite> (12 pages)</span>
</li>
<li id="cite_note-Heath_1961-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-Heath_1961_21-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHeath1961" class="citation journal cs1">Heath, F. G. (September 1961). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200328084237/https://ieeexplore.ieee.org/document/5324416/">"Pioneers Of Binary Coding"</a>. <i><a href="Journal_of_the_Institution_of_Electrical_Engineers" class="mw-redirect" title="Journal of the Institution of Electrical Engineers">Journal of the Institution of Electrical Engineers</a></i>. <b>7</b> (81). <a href="Manchester_College_of_Science_and_Technology" class="mw-redirect" title="Manchester College of Science and Technology">Manchester College of Science and Technology</a>, Faculty of Technology of the <a href="University_of_Manchester" title="University of Manchester">University of Manchester</a>, Manchester, UK: <a href="Institution_of_Engineering_and_Technology" title="Institution of Engineering and Technology">Institution of Engineering and Technology</a> (IET): <span class="nowrap">539–</span>541. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1049%2Fjiee-3.1961.0300">10.1049/jiee-3.1961.0300</a>. Archived from <a rel="nofollow" class="external text" href="https://ieeexplore.ieee.org/document/5324416">the original</a> on 2020-03-28<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-06-22</span></span>.</cite> (3 pages)</span>
</li>
<li id="cite_note-Cattermole_1969-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-Cattermole_1969_22-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFCattermole1969" class="citation book cs1 cs1-prop-location-test">Cattermole, Kenneth W. (1969). Written at Harlow, Essex, UK. <i>Principles of pulse code modulation</i> (1&nbsp;ed.). London, UK / New York, USA: <a href="Iliffe_Books_Ltd." class="mw-redirect" title="Iliffe Books Ltd.">Iliffe Books Ltd.</a> / <a href="American_Elsevier_Publishing_Company%2C_Inc." class="mw-redirect" title="American Elsevier Publishing Company, Inc.">American Elsevier Publishing Company, Inc.</a> pp.&nbsp;245, 434. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-444-19747-4</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/78-80432">78-80432</a>. <a href="SBN_(identifier)" class="mw-redirect" title="SBN (identifier)">SBN</a>&nbsp;<bdi>444-19747-8</bdi>. p.&nbsp;245: <q>[…] There seems to be some confusion about the attributation of this code, because two inventors named Gray have been associated with it. When I first heard the name I took it as referring to <a href="Elisha_Gray" title="Elisha Gray">Elisha Gray</a>, and <a href="#CITEREFHeath1961">Heath</a> testifies to his usage of it. Many people take it as referring to <a href="Frank_Gray_(researcher)" title="Frank Gray (researcher)">Frank Gray</a> of <a href="Bell_Telephone_Laboratories" class="mw-redirect" title="Bell Telephone Laboratories">Bell Telephone Laboratories</a>, who in 1947 first proposed its use in coding tubes: his patent is listed in the bibliography. […]</q></cite> (2+448+2 pages)</span>
</li>
<li id="cite_note-Edwards_2004-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-Edwards_2004_23-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFEdwards2004" class="citation book cs1"><a href="Anthony_William_Fairbank_Edwards" class="mw-redirect" title="Anthony William Fairbank Edwards">Edwards, Anthony William Fairbank</a> (2004). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=7_0Thy4V3JIC&amp;pg=PA65"><i>Cogwheels of the Mind: The Story of Venn Diagrams</i></a>. Baltimore, Maryland, USA: <a href="Johns_Hopkins_University_Press" title="Johns Hopkins University Press">Johns Hopkins University Press</a>. pp.&nbsp;48, 50. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-8018-7434-3</bdi>.</cite></span>
</li>
<li id="cite_note-Gros_1872-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-Gros_1872_24-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGros1872" class="citation book cs1 cs1-prop-foreign-lang-source">Gros, Luc-Agathon-Louis (1872). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=EcoBJRekd-sC&amp;pg=PP1"><i>Théorie du baguenodier par un clerc de notaire lyonnais</i></a> (in French) (1&nbsp;ed.). Lyon, France: <a href="Aim%C3%A9_Vingtrinier" title="Aimé Vingtrinier">Aimé Vingtrinier</a>. <a rel="nofollow" class="external text" href="http://archive.wikiwix.com/cache/20170403080613/https://books.google.fr/books?id=EcoBJRekd-sC&amp;pg=PP1">Archived</a> from the original on 2017-04-03<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-17</span></span>.</cite> <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20201217202507/https://books.googleusercontent.com/books/content?req=AKW5Qacg5gq7SW9L1sUUqK7LQ0yJLqaCu90GFZZYzcH7dsoifr-n9hxiB30SJ1mXq3FhDejHQ7fXY2ZdzlhFywe8pQGNTgMHjX0ANYxRohedbG1FmoPTuKibswKOO7qS2X4MUwQP0dBn-vt3dfTIBFRvTBOVoZZA1ROBXTGTMybnA4gGndl8v0qIAeKsRNUuEddqabMqMngisr8fp-iNt7NMFfwq_tPk0we0yXNJWj74AFsFr1JGOlAmdQ6B_OJVTOj33IhoYybhf8LMzfpaHusXsY2BWT2ZwVQulW0mgBaem9xvRZ58TSw">[2]</a>(2+16+4 pages and 4 pages foldout) (NB. This booklet was published anonymously, but is known to have been authored by Louis Gros.)</span>
</li>
<li id="cite_note-Lucas_1883-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-Lucas_1883_25-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFLucas1883" class="citation book cs1 cs1-prop-foreign-lang-source"><a href="%C3%89douard_Lucas" title="Édouard Lucas">Lucas, Édouard</a> (November 1883). <i>La tour d'Hanoï: Véritable casse tête annamite - Jeu rapporté du Tonkin par le Professeur N. Claus (de Siam) Mandarin du Collège Li Sou Stian!</i> (in French). Imprimerie Paul Bousrez, Tours.</cite> (NB. N.&nbsp;Claus de Siam is an anagram of Lucas d'Amiens, pseudonym of the author <a href="%C3%89douard_Lucas" title="Édouard Lucas">Édouard Lucas</a>.)</span>
</li>
<li id="cite_note-Parville_1883-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-Parville_1883_26-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFde_Parville1883" class="citation journal cs1 cs1-prop-interwiki-linked-name cs1-prop-foreign-lang-source"><a href="https://fr.wikipedia.org/wiki/Henri_de_Parville" class="extiw external" title="fr:Henri de Parville">de Parville, Henri</a> <span class="cs1-format">[in French]</span>, ed. (1883-12-27). <a rel="nofollow" class="external text" href="https://gallica.bnf.fr/ark:/12148/bpt6k462461g/f2.item">"La tour d'Hanoï, véritable casse-tête annamite, jeu rapporté du Tonkin par le professeur N. Claus (de Siam), mandarin du collège Li-Sou-Stian. Un vrai casse-tête, en effet, mais intéressant. Nous ne saurions mieux remercier le mandarin de son aimable intention à l'égard d'un profane qu'en signalant la Tour d'Hanoï aux personnes patientes possédées par le démon du jeu"</a>. <i><a href="Journal_des_D%C3%A9bats_Politiques_et_Litt%C3%A9raires" class="mw-redirect" title="Journal des Débats Politiques et Littéraires">Journal des Débats Politiques et Littéraires</a></i> (Review). Revue des science (in French) (Matin&nbsp;ed.). Paris, France: 1–2 [2]. ark:/12148/bpt6k462461g. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201218125345/https://gallica.bnf.fr/ark:/12148/bpt6k462461g/f2.item">Archived</a> from the original on 2020-12-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-18</span></span>.</cite> (1 page)</span>
</li>
<li id="cite_note-Allardice-Fraser_1883-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-Allardice-Fraser_1883_27-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFAllardiceFraser1883" class="citation journal cs1 cs1-prop-foreign-lang-source">Allardice, R. E.; Fraser, A. Y. (February 1883). <a href="Robert_Edgar_Allardice" title="Robert Edgar Allardice">Allardice, Robert Edgar</a>; <a href="Alexander_Yule_Fraser" title="Alexander Yule Fraser">Fraser, Alexander Yule</a> (eds.). <a rel="nofollow" class="external text" href="https://doi.org/10.1017%2FS0013091500037147">"La Tour d'Hanoï"</a>. <i><a href="https://nl.wikipedia.org/wiki/Proceedings_of_the_Edinburgh_Mathematical_Society" class="extiw external" title="nl:Proceedings of the Edinburgh Mathematical Society">Proceedings of the Edinburgh Mathematical Society</a></i> (in English and French). <b>2</b> (5). <a href="Edinburgh_Mathematical_Society" title="Edinburgh Mathematical Society">Edinburgh Mathematical Society</a>: <span class="nowrap">50–</span>53. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1017%2FS0013091500037147">10.1017/S0013091500037147</a></span>. <a href="EISSN_(identifier)" class="mw-redirect" title="EISSN (identifier)">eISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/1464-3839">1464-3839</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0013-0915">0013-0915</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:122159381">122159381</a>.</cite> <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20201218112132/https://www.cambridge.org/core/services/aop-cambridge-core/content/view/082EFE016BF3313A7BAA9335A9C0BCC1/S0013091500037147a.pdf/la-tour-d-hanoi.pdf">[3]</a> (4 pages)</span>
</li>
<li id="cite_note-Lucas_1892-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-Lucas_1892_28-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFLucas1979" class="citation book cs1 cs1-prop-foreign-lang-source"><a href="%C3%89douard_Lucas" title="Édouard Lucas">Lucas, Édouard</a> (1979) [1892]. <i>Récréations mathématiques</i> (in French). Vol.&nbsp;3 (Librairie Albert Blanchard reissue&nbsp;ed.). p.&nbsp;58.</cite> (The first edition of this book was published post-humously.)</span>
</li>
<li id="cite_note-Herter-Rote_2016-29"><span class="mw-cite-backlink">^ <a href="#cite_ref-Herter-Rote_2016_29-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Herter-Rote_2016_29-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFHerterRote2018" class="citation journal cs1">Herter, Felix; Rote, Günter (2018-11-14) [2018-08-09, 2017-12, 2017-08-09, 2016-04-22]. <a rel="nofollow" class="external text" href="https://page.mi.fu-berlin.de/rote/Papers/pdf/Loopless+Gray+code+enumeration+and+the+Tower+of+Bucharest.pdf">"Loopless Gray Code Enumeration and the Tower of Bucharest"</a> <span class="cs1-format">(PDF)</span>. <i><a href="Theoretical_Computer_Science_(journal)" title="Theoretical Computer Science (journal)">Theoretical Computer Science</a></i>. <b>748</b>. Berlin, Germany: <span class="nowrap">40–</span>54. <a href="ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/1604.06707">1604.06707</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.tcs.2017.11.017">10.1016/j.tcs.2017.11.017</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0304-3975">0304-3975</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:4014870">4014870</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201216150701/https://page.mi.fu-berlin.de/rote/Papers/pdf/Loopless+Gray+code+enumeration+and+the+Tower+of+Bucharest.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-12-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-16</span></span>.</cite> <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20201216230211/https://arxiv.org/pdf/1604.06707.pdf">[4]</a> (15/18/19/24 pages)</span>
</li>
<li id="cite_note-Gardner_1972-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-Gardner_1972_30-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGardner1972" class="citation magazine cs1"><a href="Martin_Gardner" title="Martin Gardner">Gardner, Martin</a> (August 1972). "The curious properties of the Gray code and how it can be used to solve puzzles". <i><a href="Scientific_American" title="Scientific American">Scientific American</a></i>. <a href="Mathematical_Games_column" class="mw-redirect" title="Mathematical Games column">Mathematical Games</a>. Vol.&nbsp;227, no.&nbsp;2. p.&nbsp;106.</cite> (1 page)</span>
</li>
<li id="cite_note-Zeman-Fischer_1877-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-Zeman-Fischer_1877_31-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFZemanFischer1877" class="citation journal cs1 cs1-prop-foreign-lang-source">Zeman, Johann; Fischer, Ferdinand, eds. (1877). <a rel="nofollow" class="external text" href="http://dingler.culture.hu-berlin.de/article/pj226/ar226125">"Einige neuere Vorschläge zur mehrfachen Telegraphie: A. Absatzweise vielfache Telegraphie"</a>. <i><a href="https://de.wikipedia.org/wiki/Polytechnisches_Journal" class="extiw external" title="de:Polytechnisches Journal">Dingler's Polytechnisches Journal</a></i> (in German). <b>226</b>. Augsburg, Germany: <a href="https://de.wikipedia.org/wiki/J._G._Cotta%27sche_Buchhandlung" class="extiw external" title="de:J. G. Cotta'sche Buchhandlung">J. G. Cotta'sche Buchhandlung</a>: <span class="nowrap">499–</span>507. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201221163504/http://dingler.culture.hu-berlin.de/article/pj226/ar226125">Archived</a> from the original on 2020-12-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-21</span></span>. p.&nbsp;499: <q>[…] Der um die Mitte des J[ahres] 1874 patenti[e]rte, ebenfalls dem <a href="Henry_Highton" title="Henry Highton">Highton</a>'schen verwandte Typendrucker des französischen Telegraphen-Verwaltungsbeamten Baudot wurde bei seiner 1875 patenti[e]rten Weiterentwicklung in einen fünffachen umgewandelt […]</q></cite></span>
</li>
<li id="cite_note-Froehlich-Kent_1991-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-Froehlich-Kent_1991_32-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFButrica1991" class="citation book cs1">Butrica, Andrew J. (1991-06-21). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=l3Rn_VefKaoC&amp;pg=PA31">"Baudot, Jean Maurice Emile"</a>. In Froehlich, Fritz E.; <a href="Allen_Kent" title="Allen Kent">Kent, Allen</a>; Hall, Carolyn M. (eds.). <i>The Froehlich/Kent Encyclopedia of Telecommunications: Volume 2 - Batteries to Codes-Telecommunications</i>. Vol.&nbsp;2. <a href="Marcel_Dekker_Inc." class="mw-redirect" title="Marcel Dekker Inc.">Marcel Dekker Inc.</a> / <a href="CRC_Press" title="CRC Press">CRC Press</a>. pp.&nbsp;<span class="nowrap">31–</span>34. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-8247-2901-3</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/90-3966">90-3966</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-20</span></span>. p.&nbsp;31: <q>[…] A Baudot prototype (4 years in the making) was built in 1876. The transmitter had 5 keys similar to those of a piano. Messages were sent in a special 5-element code devised by Baudot […]</q></cite></span>
</li>
<li id="cite_note-Fischer_2000-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-Fischer_2000_33-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFFischer2000" class="citation web cs1">Fischer, Eric N. (2000-06-20). <a rel="nofollow" class="external text" href="https://archive.org/details/enf-ascii">"The Evolution of Character Codes, 1874–1968"</a>. ark:/13960/t07x23w8s<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-20</span></span>. <q>[…] In 1872, [Baudot] started research toward a telegraph system that would allow multiple operators to transmit simultaneously over a single wire and, as the transmissions were received, would print them in ordinary alphabetic characters on a strip of paper. He received a patent for such a system on June 17, 1874. […] Instead of a variable delay followed by a single-unit pulse, Baudot's system used a uniform six time units to transmit each character. […] his early telegraph probably used the six-unit code […] that he attributes to <a href="Edward_Davy" title="Edward Davy">Davy</a> in an 1877 article. […] in 1876 Baudot redesigned his equipment to use a five-unit code. Punctuation and digits were still sometimes needed, though, so he adopted from <a href="David_Edward_Hughes" title="David Edward Hughes">Hughes</a> the use of two special letter space and figure space characters that would cause the printer to shift between cases at the same time as it advanced the paper without printing. The five-unit code he began using at this time […] was structured to suit his keyboard […], which controlled two units of each character with switches operated by the left hand and the other three units with the right hand. […]</q></cite> <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20180919020435/http://index-of.es/Varios-2/ASCII%20The%20Evolution%20of%20Character%20Codes.pdf">[5]</a><a rel="nofollow" class="external autonumber" href="https://archive.org/details/enf-ascii">[6]</a></span>
</li>
<li id="cite_note-Rothen_1884-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-Rothen_1884_34-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFRothen1884" class="citation journal cs1 cs1-prop-long-vol cs1-prop-foreign-lang-source">Rothen, Timotheus (1884-12-25). <a rel="nofollow" class="external text" href="https://gallica.bnf.fr/ark:/12148/bpt6k5725454q/f9.item">"Le télégraphe imprimeur Baudot"</a>. <i>Journal Télégraphique</i> (in French). VIII / #16 (12). Berne, Switzerland: Le Bureau International des Administrations Télégraphiques: 241–253 [249]. <a href="EISSN_(identifier)" class="mw-redirect" title="EISSN (identifier)">eISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/2725-738X">2725-738X</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/2223-1420">2223-1420</a>. ark:/12148/bpt6k5725454q. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201221162054/https://gallica.bnf.fr/ark:/12148/bpt6k5725454q/f9.item.zoom">Archived</a> from the original on 2020-12-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-20</span></span>.</cite></span>
</li>
<li id="cite_note-Pendry_1920-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-Pendry_1920_35-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFPendry1920" class="citation book cs1 cs1-prop-location-test">Pendry, Henry Walter (1920) [October 1919]. Written at London, UK. <a rel="nofollow" class="external text" href="https://books.google.com/books?id=CfQKAQAAIAAJ"><i>The Baudôt Printing Telegraph System</i></a> (2&nbsp;ed.). London, Bath, Melbourne, New York: <a href="Sir_Isaac_Pitman_and_Sons%2C_Ltd." class="mw-redirect" title="Sir Isaac Pitman and Sons, Ltd.">Sir Isaac Pitman and Sons, Ltd.</a> pp.&nbsp;<span class="nowrap">43–</span>44. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/21005277">21005277</a>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/778309351">778309351</a>. <a href="OL_(identifier)" class="mw-redirect" title="OL (identifier)">OL</a>&nbsp;<a rel="nofollow" class="external text" href="https://openlibrary.org/books/OL6633244M">6633244M</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-20</span></span>.</cite> (vii+184 pages) (NB. A first edition was published in 1913.)</span>
</li>
<li id="cite_note-MacMillan_2010-36"><span class="mw-cite-backlink">^ <a href="#cite_ref-MacMillan_2010_36-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-MacMillan_2010_36-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFMacMillan2010" class="citation web cs1">MacMillan, David M. (2010-04-27) [2010-04-25, 2010-04-23]. <a rel="nofollow" class="external text" href="http://www.circuitousroot.com/artifice/telegraphy/tty/codes/index.html">"Codes that Don't Count - Some Printing Telegraph Codes as Products of their Technologies (With Particular Attention to the Teletypesetter)"</a>. <i>lemur.com</i>. Revision 3. Mineral Point, Wisconsin, USA. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201218233813/http://www.circuitousroot.com/artifice/telegraphy/tty/codes/index.html">Archived</a> from the original on 2020-12-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-20</span></span>.</cite></span>
</li>
<li id="cite_note-ITU_1909-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-ITU_1909_37-0">^</a></b></span> <span class="reference-text"><cite class="citation book cs1 cs1-prop-location-test cs1-prop-foreign-lang-source"> Written at Lisbon, Portugal. <i>Convention télégraphique internationale de Saint-Pétersbourg et Règlement et tarifs y annexés, Revision de Lisbonne, 1908 / Extraits de la publication: Documents de la Conférence télégraphique internationale de Lisbonne</i> (in French). Berne, Switzerland: <a href="Bureau_Internationale_de_L'Union_T%C3%A9l%C3%A9graphique" class="mw-redirect" title="Bureau Internationale de L'Union Télégraphique">Bureau Internationale de L'Union Télégraphique</a>. 1909 [1908].</cite></span>
</li>
<li id="cite_note-ITU_1933_FR-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-ITU_1933_FR_38-0">^</a></b></span> <span class="reference-text"><cite class="citation book cs1 cs1-prop-location-test cs1-prop-foreign-lang-source">"Chapter IX. Signaux de transmission, Article 35. Signaux de transmission des alphabets télegraphiques internationaux 'nos 1 et 2, signaux d.u code Morse, de l'appareil Hughes et de l'appareil Siemens". Written at Madrid, Spain. <a rel="nofollow" class="external text" href="http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.fr.201.pdf"><i>Règlement télégraphique annexé à la convention internationale des télécommunications - protocol finale audit règlement - Madrid, 1932</i></a> <span class="cs1-format">(PDF)</span> (in French). Berne, Switzerland: <a href="Bureau_Internationale_de_L'Union_T%C3%A9l%C3%A9graphique" class="mw-redirect" title="Bureau Internationale de L'Union Télégraphique">Bureau Internationale de L'Union Télégraphique</a>. 1933 [1932]. pp.&nbsp;31–40 [33]. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201221011133/http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.fr.201.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-12-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-21</span></span>.</cite> (1+188 pages) <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20201221012741/https://www.itu.int/en/history/Pages/PlenipotentiaryConferences.aspx?conf=4.5">[7]</a></span>
</li>
<li id="cite_note-ITU_1933_EN-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-ITU_1933_EN_39-0">^</a></b></span> <span class="reference-text"><cite class="citation book cs1 cs1-prop-foreign-lang-source">"Chapter IX. Transmission Signals. Article 35. Transmission Signals of the International Telegraph Alphabets Nos. 1 and 2, Morse Code Signals and Signals of the Hughes and Siemens Instruments.". <a rel="nofollow" class="external text" href="http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.en.101.pdf"><i>Telegraph Regulations Annexed To The International Telecommunication Convention - Final Protocol To The Telegraph Regulations - Madrid 1932</i></a> <span class="cs1-format">(PDF)</span> (in English and French). London, UK: General Post Office / <a href="His_Majesty's_Stationery_Office" class="mw-redirect" title="His Majesty's Stationery Office">His Majesty's Stationery Office</a>. 1933 [1932]. pp.&nbsp;32–40 [34]. 43-152-2 / 18693. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201221011748/http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.en.101.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-12-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-21</span></span>.</cite> (1+2*120+26 pages) <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20201221012741/https://www.itu.int/en/history/Pages/PlenipotentiaryConferences.aspx?conf=4.5">[8]</a></span>
</li>
<li id="cite_note-Zemanek_1979-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-Zemanek_1979_40-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFZemanek1983" class="citation book cs1 cs1-prop-long-vol cs1-prop-foreign-lang-source"><a href="Heinrich_Josef_Zemanek" class="mw-redirect" title="Heinrich Josef Zemanek">Zemanek, Heinrich "Heinz" Josef</a> (1983-12-01). <i>Otto Schäffler (1838-1928). Pionier des Telephons, der Telegraphie und der Lochkarte sowie Erbauer der ersten Wiener Telephonzentrale</i>. Blätter für Technikgeschichte (in German and English). Vol.&nbsp;41–43 (1979–1981) (1&nbsp;ed.). Vienna, Austria: <a href="Technisches_Museum_f%C3%BCr_Industrie_und_Gewerbe" class="mw-redirect" title="Technisches Museum für Industrie und Gewerbe">Technisches Museum für Industrie und Gewerbe</a>, Forschungsinstitut für Technikgeschichte / <a href="Springer-Verlag" class="mw-redirect" title="Springer-Verlag">Springer-Verlag</a>. pp.&nbsp;<span class="nowrap">81–</span>118. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>3-21181779-4</bdi>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0067-9127">0067-9127</a>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/952698275">952698275</a>.</cite></span>
</li>
<li id="cite_note-Zemanek_1976-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-Zemanek_1976_41-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFZemanek1976" class="citation conference cs1 cs1-prop-location-test"><a href="Heinrich_Josef_Zemanek" class="mw-redirect" title="Heinrich Josef Zemanek">Zemanek, Heinrich "Heinz" Josef</a> (1976-06-07). <a rel="nofollow" class="external text" href="https://www.computer.org/csdl/pds/api/csdl/proceedings/download-article/12OmNzZEAtH/pdf">"Computer prehistory and history in central Europe"</a>. Written at Vienna, Austria. <i>International Workshop on Managing Requirements Knowledge</i>. AFIPS '76: Proceedings of the June 7–10, 1976, national computer conference and exposition June 1976. Vol.&nbsp;1. New York, USA: <a href="American_Federation_of_Information_Processing_Societies" title="American Federation of Information Processing Societies">American Federation of Information Processing Societies</a>, <a href="Association_for_Computing_Machinery" title="Association for Computing Machinery">Association for Computing Machinery</a>. pp.&nbsp;<span class="nowrap">15–</span>20. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1499799.1499803">10.1145/1499799.1499803</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-4503-7917-5</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:14114959">14114959</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201217230013/https://www.computer.org/csdl/pds/api/csdl/proceedings/download-article/12OmNzZEAtH/pdf">Archived</a> from the original on 2020-12-17<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-17</span></span>. p.&nbsp;17: <q>[…] In 1874, Schaeffler invented another <a href="Printing_telegraph" title="Printing telegraph">printing telegraph</a>, a quadruple system like the <a href="Baudot_telegraph" class="mw-redirect" title="Baudot telegraph">Baudot</a>, but mechanically more sophisticated. The <a href="Hughes_telegraph" class="mw-redirect" title="Hughes telegraph">Hughes telegraph</a> had two synchronously rotating fingers, one in the sender and one in the receiver. By a piano-like keyboard the operator selected a letter and thereby made contact with the rotating finger in the corresponding direction. Since the receiving finger was in the same direction at this moment, the receiver could print the correct letter. The Baudot and the Schaeffler printing telegraphs use a five-bit binary code. ... Schaeffler's code is a reflected binary code! What <a href="Frank_Gray_(researcher)" title="Frank Gray (researcher)">F. Gray</a> patented in 1953 for <a href="PCM" class="mw-redirect" title="PCM">PCM</a>, Schaeffler had applied in his telegraph in 1874, and for a similar reason: reliability. He had contact fingers sensing on five cams consecutively all combinations; the right one triggers printing. If the fingers are to make a minimal number of movements, the solution is the reflected binary code. For Schaeffler, this idea was a minor one. More exactly, the code is described in a letter by the Austrian Post employee, J[ohann] N[epomuk] Teufelhart, <a href="#CITEREFRothen1878">inserted there</a> as a footnote and telling that Schaeffler found the code by combining wooden bars with the different combinations until he had the best solution. Another Post employee, Alexander Wilhelm Lambert of Linz, claims to have shown this code to Schaeffler as early as 1872, but this claim is not clear and cannot be checked. […]</q></cite> (6 pages)</span>
</li>
<li id="cite_note-Goodall_1951-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-Goodall_1951_42-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGoodall1951" class="citation journal cs1">Goodall, William M. (January 1951). "Television by Pulse Code Modulation". <i><a href="Bell_System_Technical_Journal" class="mw-redirect" title="Bell System Technical Journal">Bell System Technical Journal</a></i>. <b>30</b> (1): <span class="nowrap">33–</span>49. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1002%2Fj.1538-7305.1951.tb01365.x">10.1002/j.1538-7305.1951.tb01365.x</a>.</cite> (NB. Presented orally before the I.R.E. National Convention, New York City, March 1949.)</span>
</li>
<li id="cite_note-Karnaugh_1953-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-Karnaugh_1953_43-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKarnaugh1953" class="citation journal cs1"><a href="Maurice_Karnaugh" title="Maurice Karnaugh">Karnaugh, Maurice</a> (November 1953) [1953-04-23, 1953-03-17]. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20170416232229/http://philectrosophy.com/documents/The%20Map%20Method%20For%20Synthesis%20of.pdf">"The Map Method for Synthesis of Combinational Logic Circuits"</a> <span class="cs1-format">(PDF)</span>. <i><a href="Transactions_of_the_American_Institute_of_Electrical_Engineers%2C_Part_I%3A_Communication_and_Electronics" class="mw-redirect" title="Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics">Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics</a></i>. <b>72</b> (5): <span class="nowrap">593–</span>599. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTCE.1953.6371932">10.1109/TCE.1953.6371932</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:51636736">51636736</a>. Paper 53-217. Archived from <a rel="nofollow" class="external text" href="http://philectrosophy.com/documents/The%20Map%20Method%20For%20Synthesis%20of.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2017-04-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-04-16</span></span>.</cite> (NB. Also contains a short review by <a href="Samuel_H._Caldwell" title="Samuel H. Caldwell">Samuel H. Caldwell</a>.)</span>
</li>
<li id="cite_note-Wakerly_1994-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-Wakerly_1994_44-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWakerly1994" class="citation book cs1">Wakerly, John F. (1994). <i>Digital Design: Principles &amp; Practices</i>. New Jersey, USA: <a href="Prentice_Hall" title="Prentice Hall">Prentice Hall</a>. pp.&nbsp;<span class="nowrap">48–</span>49, 222. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-13-211459-3</bdi>.</cite> (NB. The two page sections taken together say that <a href="K-map" class="mw-redirect" title="K-map">K-maps</a> are labeled with Gray code. The first section says that they are labeled with a code that changes only one bit between entries and the second section says that such a code is called Gray code.)</span>
</li>
<li id="cite_note-Brown_2012-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-Brown_2012_45-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBrown2012" class="citation book cs1">Brown, Frank Markham (2012) [2003, 1990]. "3.9.2 Maps". <i>Boolean Reasoning – The Logic of Boolean Equations</i> (reissue of 2nd&nbsp;ed.). Mineola, New York, USA: <a href="Dover_Publications%2C_Inc." class="mw-redirect" title="Dover Publications, Inc.">Dover Publications, Inc.</a> p.&nbsp;49. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-486-42785-0</bdi>. p.&nbsp;49: <q>[…] Karnaugh's map orders the arguments of the discriminants according to the reflected binary code, also called the Gray code. […]</q></cite> (xii+291+3 pages) <a rel="nofollow" class="external text" href="https://web.archive.org/web/20170416231752/http://www2.fiit.stuba.sk/~kvasnicka/Free%20books/Brown_Boolean%20Reasoning.pdf">1st edition</a></span>
</li>
<li id="cite_note-Händler_1958-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-Händler_1958_46-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHändler1958" class="citation book cs1 cs1-prop-foreign-lang-source"><a href="Wolfgang_H%C3%A4ndler" title="Wolfgang Händler">Händler, Wolfgang</a> (1958). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=D58TAQAAIAAJ"><i>Ein Minimisierungsverfahren zur Synthese von Schaltkreisen (Minimisierungsgraphen)</i></a> (Dissertation) (in German). Potsdam, Germany: <a href="Technische_Hochschule_Darmstadt" class="mw-redirect" title="Technische Hochschule Darmstadt">Technische Hochschule Darmstadt</a>. D&nbsp;17.</cite> (73 pages+app.) <a rel="nofollow" class="external autonumber" href="https://www.tib.eu/de/suchen/id/TIBKAT%3A044782241/Ein-Minimisierungsverfahren-zur-Synthese-von-Schaltkreisen/">[9]</a></span>
</li>
<li id="cite_note-Steinbuch-Wagner_1967-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-Steinbuch-Wagner_1967_47-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBergerHändler1967" class="citation book cs1 cs1-prop-foreign-lang-source">Berger, Erich R.; <a href="Wolfgang_H%C3%A4ndler" title="Wolfgang Händler">Händler, Wolfgang</a> (1967) [1962]. <a href="Karl_W._Steinbuch" class="mw-redirect" title="Karl W. Steinbuch">Steinbuch, Karl W.</a>; Wagner, Siegfried W. (eds.). <i>Taschenbuch der Nachrichtenverarbeitung</i> (in German) (2&nbsp;ed.). Berlin, Germany: <a href="Springer-Verlag_OHG" class="mw-redirect" title="Springer-Verlag OHG">Springer-Verlag OHG</a>. pp.&nbsp;64, <span class="nowrap">1034–</span>1035, 1036, 1038. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/67-21079">67-21079</a>. Title No. 1036. p.&nbsp;64: <q>[…] Übersichtlich ist die Darstellung nach <i><a href="Wolfgang_H%C3%A4ndler" title="Wolfgang Händler">Händler</a></i>, die sämtliche Punkte, numeriert nach dem <i>Gray-Code</i> […], auf dem Umfeld eines Kreises anordnet. Sie erfordert allerdings sehr viel Platz. […]</q> [<i>Händler's</i> diagram, where all points, numbered according to the <i>Gray code</i>, are arranged on the circumference of a circle, is easily comprehensible. It needs, however, a lot of space.]</cite></span>
</li>
<li id="cite_note-ISER_1-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-ISER_1_48-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1 cs1-prop-foreign-lang-source"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20170516154655/https://www.rrze.fau.de/wir-ueber-uns/kooperationen/iser.shtml">"Informatik Sammlung Erlangen (ISER)"</a> (in German). Erlangen, Germany: <a href="Friedrich-Alexander_Universit%C3%A4t" class="mw-redirect" title="Friedrich-Alexander Universität">Friedrich-Alexander Universität</a>. 2012-03-13. Archived from <a rel="nofollow" class="external text" href="https://www.rrze.fau.de/wir-ueber-uns/kooperationen/iser.shtml">the original</a> on 2017-05-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-04-12</span></span>.</cite></span>
</li>
<li id="cite_note-ISER_2-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-ISER_2_49-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1 cs1-prop-foreign-lang-source"><a rel="nofollow" class="external text" href="http://www.iser.uni-erlangen.de:80/index.php?ort_id=327&amp;tree=0">"Informatik Sammlung Erlangen (ISER) – Impressum"</a> (in German). Erlangen, Germany: <a href="Friedrich-Alexander_Universit%C3%A4t" class="mw-redirect" title="Friedrich-Alexander Universität">Friedrich-Alexander Universität</a>. 2012-03-13. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20120226004316/http://www.iser.uni-erlangen.de/index.php?ort_id=327&amp;tree=0">Archived</a> from the original on 2012-02-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-04-15</span></span>.</cite></span>
</li>
<li id="cite_note-Bhat-Savage_1996-50"><span class="mw-cite-backlink">^ <a href="#cite_ref-Bhat-Savage_1996_50-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Bhat-Savage_1996_50-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Bhat-Savage_1996_50-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Bhat-Savage_1996_50-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Bhat-Savage_1996_50-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFBhatSavage1996" class="citation journal cs1">Bhat, Girish S.; <a href="Carla_Diane_Savage" class="mw-redirect" title="Carla Diane Savage">Savage, Carla Diane</a> (1996). <a rel="nofollow" class="external text" href="https://www.combinatorics.org/ojs/index.php/eljc/article/view/v3i1r25/">"Balanced Gray Codes"</a>. <i><a href="Electronic_Journal_of_Combinatorics" title="Electronic Journal of Combinatorics">Electronic Journal of Combinatorics</a></i>. <b>3</b> (1). <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.37236%2F1249">10.37236/1249</a></span>.</cite></span>
</li>
<li id="cite_note-Donohue_2003-51"><span class="mw-cite-backlink"><b><a href="#cite_ref-Donohue_2003_51-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFDonohue2003" class="citation web cs1">Donohue, Ryan (2003). <a rel="nofollow" class="external text" href="https://www.stanford.edu/class/ee183/handouts_spr2003/synchronization_pres.pdf">"Synchronization in Digital Logic Circuits"</a> <span class="cs1-format">(PDF)</span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180115012747/https://web.stanford.edu/class/ee183/handouts_spr2003/synchronization_pres.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2018-01-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-15</span></span>.</cite></span>
</li>
<li id="cite_note-Hulst_1957-53"><span class="mw-cite-backlink"><b><a href="#cite_ref-Hulst_1957_53-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHulst1962" class="citation book cs1">Hulst, George D. (1962-02-06) [1957-11-15]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/a2/e5/21/f5abbb073bf21c/US3020481.pdf"><i>Reflected binary code counter</i></a> <span class="cs1-format">(PDF)</span>. Nutley, New Jersey, USA: <a href="International_Telephone_and_Telegraph_Corporation" class="mw-redirect" title="International Telephone and Telegraph Corporation">International Telephone and Telegraph Corporation</a> (ITT). <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US3020481">U.S. patent 3,020,481</a></span>. Serial No. 696793. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200806210248/https://patentimages.storage.googleapis.com/a2/e5/21/f5abbb073bf21c/US3020481.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-08-06<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-08-06</span></span>.</cite> (5 pages)</span>
</li>
<li id="cite_note-Powell_1968-54"><span class="mw-cite-backlink">^ <a href="#cite_ref-Powell_1968_54-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Powell_1968_54-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Powell_1968_54-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Powell_1968_54-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFPowell1968" class="citation book cs1">Powell, E. Alexander (June 1968). "Codes particularly useful for analogue to digital conversions". <a rel="nofollow" class="external text" href="https://dspace.lib.cranfield.ac.uk/bitstream/handle/1826/9559/COA_Memo_156_June_1968.pdf"><i>A short note on useful codes for Fluidic Control Circuits</i></a> <span class="cs1-format">(PDF)</span>. Cranfield, UK: <a href="College_of_Aeronautics%2C_Cranfield" class="mw-redirect" title="College of Aeronautics, Cranfield">The College of Aeronautics</a>, Department of Production Engineering. pp.&nbsp;7, 9. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:215864694">215864694</a>. CoA Memo 156. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201215124905/https://dspace.lib.cranfield.ac.uk/bitstream/handle/1826/9559/COA_Memo_156_June_1968.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-12-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-15</span></span>.</cite> (18 pages) (NB. The paper names the <a href="#Glixon">Glixon code</a> <i>modified Gray code</i> and misspells <a href="Richard_W._Hamming" class="mw-redirect" title="Richard W. Hamming">Richard W. Hamming</a>'s name.)</span>
</li>
<li id="cite_note-Mehta-Owens-Irwin_1996-55"><span class="mw-cite-backlink"><b><a href="#cite_ref-Mehta-Owens-Irwin_1996_55-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMehtaOwensIrwin1996" class="citation book cs1">Mehta, Huzefa; Owens, Robert Michael; Irwin, Mary Jane "Janie" (1996-03-22). "Some issues in gray code addressing". <i>Proceedings of the Sixth Great Lakes Symposium on VLSI</i>. <a href="IEEE_Computer_Society" title="IEEE Computer Society">IEEE Computer Society</a>. pp.&nbsp;<span class="nowrap">178–</span>181. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FGLSV.1996.497616">10.1109/GLSV.1996.497616</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-8186-7502-7</bdi>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/1066-1395">1066-1395</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:52837310">52837310</a>.</cite></span>
</li>
<li id="cite_note-Doran_2007-56"><span class="mw-cite-backlink">^ <a href="#cite_ref-Doran_2007_56-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Doran_2007_56-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFDoran2007" class="citation book cs1"><a href="Robert_William_Doran" class="mw-redirect" title="Robert William Doran">Doran, Robert "Bob" William</a> (March 2007). <a rel="nofollow" class="external text" href="https://www.cs.auckland.ac.nz/research/groups/CDMTCS//researchreports/304bob.pdf"><i>The Gray Code</i></a> <span class="cs1-format">(PDF)</span>. CDMTCS Research Report Series. Centre for Discrete Mathematics and Theoretical Computer Science, <a href="University_of_Auckland" title="University of Auckland">University of Auckland</a>, New Zealand. CDMTCS-304. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200522091749/https://www.cs.auckland.ac.nz/research/groups/CDMTCS//researchreports/304bob.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-05-22<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-23</span></span>.</cite> (25 pages)</span>
</li>
<li id="cite_note-Su-Tsui-Despain_1994-57"><span class="mw-cite-backlink"><b><a href="#cite_ref-Su-Tsui-Despain_1994_57-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSuTsuiDespain1994" class="citation report cs1">Su, Ching-Long; Tsui, Chi-Ying; Despain, Alvin M. (1994). <a rel="nofollow" class="external text" href="http://www.scarpaz.com/2100-papers/Power%20Estimation/su94-low%20power%20architecture%20and%20compilation.pdf">Low Power Architecture Design and Compilation Techniques for High-Performance Processors</a> <span class="cs1-format">(PDF)</span> (Report). Advanced Computer Architecture Laboratory. ACAL-TR-94-01. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200726170626/http://www.scarpaz.com/2100-papers/Power%20Estimation/su94-low%20power%20architecture%20and%20compilation.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-07-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-17</span></span>.</cite></span>
</li>
<li id="cite_note-Guo-Parameswaran_2010-58"><span class="mw-cite-backlink"><b><a href="#cite_ref-Guo-Parameswaran_2010_58-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGuoParameswaran2010" class="citation journal cs1">Guo, Hui; Parameswaran, Sri (April–June 2010). "Shifted Gray encoding to reduce instruction memory address bus switching for low-power embedded systems". <i>Journal of Systems Architecture</i>. <b>56</b> (<span class="nowrap">4–</span>6): <span class="nowrap">180–</span>190. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.sysarc.2010.03.003">10.1016/j.sysarc.2010.03.003</a>.</cite></span>
</li>
<li id="cite_note-Dietz_2002-60"><span class="mw-cite-backlink"><b><a href="#cite_ref-Dietz_2002_60-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFDietz2002" class="citation web cs1">Dietz, Henry Gordon "Hank" (2002). <a rel="nofollow" class="external text" href="https://aggregate.org/MAGIC/#Gray%20Code%20Conversion">"The Aggregate Magic Algorithms: Gray Code Conversion"</a>. <i>The Aggregate</i>. Electrical and Computer Engineering Department, College of Engineering, <a href="University_of_Kentucky" title="University of Kentucky">University of Kentucky</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201216122620/http://aggregate.org/MAGIC/#Gray%2520Code%2520Conversion">Archived</a> from the original on 2020-12-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-16</span></span>.</cite></span>
</li>
<li id="cite_note-61"><span class="mw-cite-backlink"><b><a href="#cite_ref-61">^</a></b></span> <span class="reference-text"><cite id="CITEREFMaxfield2007" class="citation web cs1">Maxfield, Max (2007-06-29). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220129122352/https://www.eetimes.com/how-to-generate-gray-codes-for-non-power-of-2-sequences/">"How to generate Gray Codes for non-power-of-2 sequences"</a>. Archived from <a rel="nofollow" class="external text" href="https://www.eetimes.com/how-to-generate-gray-codes-for-non-power-of-2-sequences/">the original</a> on 2022-01-29<span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-29</span></span>.</cite></span>
</li>
<li id="cite_note-62"><span class="mw-cite-backlink"><b><a href="#cite_ref-62">^</a></b></span> <span class="reference-text">(sequence <span class="nowrap external"><a href="https://oeis.org/A290772" class="extiw external" title="oeis:A290772">A290772</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>)</span>
</li>
<li id="cite_note-Guan_1998-63"><span class="mw-cite-backlink">^ <a href="#cite_ref-Guan_1998_63-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Guan_1998_63-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGuan1998" class="citation journal cs1">Guan, Dah-Jyh (1998). "Generalized Gray Codes with Applications". <i>Proceedings of the National Scientific Council, Republic of China, Part A</i>. <b>22</b>: <span class="nowrap">841–</span>848. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.119.1344">10.1.1.119.1344</a></span>.</cite></span>
</li>
<li id="cite_note-64"><span class="mw-cite-backlink"><b><a href="#cite_ref-64">^</a></b></span> <span class="reference-text"><cite id="CITEREFWagnerWest1991" class="citation journal cs1">Wagner, D. G.; West, J. (1991). "Construction of Uniform Gray Codes". <i>Congressus Numerantium</i>. <b>80</b>: <span class="nowrap">217–</span>223.</cite></span>
</li>
<li id="cite_note-Suparta_2005-65"><span class="mw-cite-backlink">^ <a href="#cite_ref-Suparta_2005_65-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Suparta_2005_65-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFSuparta2005" class="citation journal cs1">Suparta, I. Nengah (2005). <a rel="nofollow" class="external text" href="https://doi.org/10.37236%2F1986">"A simple proof for the existence of exponentially balanced Gray codes"</a>. <i><a href="Electronic_Journal_of_Combinatorics" title="Electronic Journal of Combinatorics">Electronic Journal of Combinatorics</a></i>. <b>12</b>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.37236%2F1986">10.37236/1986</a></span>.</cite></span>
</li>
<li id="cite_note-Flahive-Bose_2007-66"><span class="mw-cite-backlink">^ <a href="#cite_ref-Flahive-Bose_2007_66-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Flahive-Bose_2007_66-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFFlahiveBose2007" class="citation journal cs1"><a href="Mary_Elizabeth_Flahive" class="mw-redirect" title="Mary Elizabeth Flahive">Flahive, Mary Elizabeth</a>; Bose, Bella (2007). <a rel="nofollow" class="external text" href="https://doi.org/10.37236%2F949">"Balancing cyclic <i>R</i>-ary Gray codes"</a>. <i><a href="Electronic_Journal_of_Combinatorics" title="Electronic Journal of Combinatorics">Electronic Journal of Combinatorics</a></i>. <b>14</b>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.37236%2F949">10.37236/949</a></span>.</cite></span>
</li>
<li id="cite_note-Strackx-Piessens_2016-67"><span class="mw-cite-backlink"><b><a href="#cite_ref-Strackx-Piessens_2016_67-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFStrackxPiessens2016" class="citation journal cs1">Strackx, Raoul; Piessens, Frank (2016). <a rel="nofollow" class="external text" href="https://distrinet.cs.kuleuven.be/software/sce/ariadne.html">"Ariadne: A Minimal Approach to State Continuity"</a>. <i>Usenix Security</i>. <b>25</b>.</cite></span>
</li>
<li id="cite_note-68"><span class="mw-cite-backlink"><b><a href="#cite_ref-68">^</a></b></span> <span class="reference-text"><cite id="CITEREFSavage1997" class="citation journal cs1"><a href="Carla_Diane_Savage" class="mw-redirect" title="Carla Diane Savage">Savage, Carla Diane</a> (1997). <a rel="nofollow" class="external text" href="http://www4.ncsu.edu/~savage/AVAILABLE_FOR_MAILING/survey.ps">"A Survey of Combinatorial Gray Codes"</a>. <i><a href="SIAM_Review" class="mw-redirect" title="SIAM Review">SIAM Review</a></i>. <b>39</b> (4). <a href="Society_for_Industrial_and_Applied_Mathematics" title="Society for Industrial and Applied Mathematics">Society for Industrial and Applied Mathematics</a> (SIAM): <span class="nowrap">605–</span>629. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1997SIAMR..39..605S">1997SIAMR..39..605S</a>. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.1924">10.1.1.39.1924</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2FS0036144595295272">10.1137/S0036144595295272</a>. <a href="JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&nbsp;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2132693">2132693</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:6375360">6375360</a>.</cite></span>
</li>
<li id="cite_note-Savage-Winkler_1995-69"><span class="mw-cite-backlink">^ <a href="#cite_ref-Savage-Winkler_1995_69-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Savage-Winkler_1995_69-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFSavageWinkler1995" class="citation journal cs1"><a href="Carla_Diane_Savage" class="mw-redirect" title="Carla Diane Savage">Savage, Carla Diane</a>; <a href="Peter_Winkler" title="Peter Winkler">Winkler, Peter</a> (1995). <a rel="nofollow" class="external text" href="https://doi.org/10.1016%2F0097-3165%2895%2990091-8">"Monotone Gray codes and the middle levels problem"</a>. <i><a href="Journal_of_Combinatorial_Theory" title="Journal of Combinatorial Theory">Journal of Combinatorial Theory</a></i>. Series A. <b>70</b> (2): <span class="nowrap">230–</span>248. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1016%2F0097-3165%2895%2990091-8">10.1016/0097-3165(95)90091-8</a></span>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0097-3165">0097-3165</a>.</cite></span>
</li>
<li id="cite_note-Savage_1997-70"><span class="mw-cite-backlink"><b><a href="#cite_ref-Savage_1997_70-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSavage1997" class="citation journal cs1"><a href="Carla_Diane_Savage" class="mw-redirect" title="Carla Diane Savage">Savage, Carla Diane</a> (1997-01-16). <a rel="nofollow" class="external text" href="http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=DACA73A3D791549CE05443B7948527EC?doi=10.1.1.39.2249&amp;rep=rep1&amp;type=pdf">"Long cycles in the middle two levels of the Boolean lattice"</a>. <i><a href="Ars_Combinatoria_(journal)" title="Ars Combinatoria (journal)">Ars Combinatoria</a></i>. <b>35</b> (A). North Carolina State University, Raleigh, North Carolina, USA: <span class="nowrap">97–</span>108. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.2249">10.1.1.39.2249</a></span>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0381-7032">0381-7032</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:15975960">15975960</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200513191647/http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=DACA73A3D791549CE05443B7948527EC?doi=10.1.1.39.2249&amp;rep=rep1&amp;type=pdf">Archived</a> from the original on 2020-05-13<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-13</span></span>.</cite> (15 pages)</span>
</li>
<li id="cite_note-Goddyn_1999-71"><span class="mw-cite-backlink">^ <a href="#cite_ref-Goddyn_1999_71-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Goddyn_1999_71-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGoddyn1999" class="citation web cs1">Goddyn, Luis (1999). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150217160033/http://people.math.sfu.ca/~goddyn/Courses/343/supMaterials.pdf">"MATH 343 Applied Discrete Math Supplementary Materials"</a> <span class="cs1-format">(PDF)</span>. Department of Mathematics, <a href="Simon_Fraser_University" title="Simon Fraser University">Simon Fraser University</a>. Archived from <a rel="nofollow" class="external text" href="https://www.math.sfu.ca/~goddyn/Courses/343/supMaterials.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2015-02-17.</cite></span>
</li>
<li id="cite_note-Sawada-Wong_2007-72"><span class="mw-cite-backlink"><b><a href="#cite_ref-Sawada-Wong_2007_72-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSawadaWong2007" class="citation journal cs1">Sawada, Joseph "Joe"; Wong, Dennis Chi-Him (2007). "A Fast Algorithm to generate Beckett–Gray codes". <i>Electronic Notes in Discrete Mathematics</i>. <b>29</b>: <span class="nowrap">571–</span>577. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2Fj.endm.2007.07.091">10.1016/j.endm.2007.07.091</a>.</cite></span>
</li>
<li id="cite_note-Richards_1971-73"><span class="mw-cite-backlink"><b><a href="#cite_ref-Richards_1971_73-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFRichards1971" class="citation book cs1 cs1-prop-location-test">Richards, Richard Kohler (January 1971). "Snake-in-the-Box Codes". Written at Ames, Iowa, USA. <i>Digital Design</i>. New York, USA: <a href="Wiley-Interscience" class="mw-redirect" title="Wiley-Interscience">Wiley-Interscience</a>, <a href="John_Wiley_%26_Sons%2C_Inc." class="mw-redirect" title="John Wiley &amp; Sons, Inc.">John Wiley &amp; Sons, Inc.</a> pp.&nbsp;<span class="nowrap">206–</span>207. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-471-71945-5</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/73-147235">73-147235</a>.</cite> (12+577+1 pages)</span>
</li>
<li id="cite_note-Spedding_1994_1-74"><span class="mw-cite-backlink">^ <a href="#cite_ref-Spedding_1994_1_74-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Spedding_1994_1_74-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1041539562">
/* start https://en.wikipedia.org/ */


.mw-parser-output .citation{word-wrap:break-word}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}


/* end https://en.wikipedia.org/ */
</style><span class="citation patent" id="CITEREFSpedding1994"><a rel="nofollow" class="external text" href="https://worldwide.espacenet.com/textdoc?DB=EPODOC&amp;IDX=NZ264738">NZ 264738</a>, Spedding, Norman Bruce, "A position encoder", published 1994-10-28</span><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Apatent&amp;rft.number=264738&amp;rft.cc=NZ&amp;rft.title=A+position+encoder&amp;rft.inventor=Spedding&amp;rft.pubdate=1994-10-28"><span style="display: none;">&nbsp;</span></span></span>
</li>
<li id="cite_note-Spedding_1994_2-75"><span class="mw-cite-backlink"><b><a href="#cite_ref-Spedding_1994_2_75-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSpedding1994" class="citation web cs1">Spedding, Norman Bruce (1994-10-28). <a rel="nofollow" class="external text" href="http://www.winzurf.co.nz/Single_Track_Grey_Code_Patent/Single_track_Grey_code_encoder_patent.pdf">"The following is a copy of the provisional patent filed on behalf of Industrial Research Limited on 1994-10-28 – NZ Patent 264738"</a> <span class="cs1-format">(PDF)</span>. Industrial Research Limited. NZ Patent 264738. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20171029205005/http://www.winzurf.co.nz/Single_Track_Grey_Code_Patent/Single_track_Grey_code_encoder_patent.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2017-10-29<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-Hiltgen-Paterson-Brandestini_1996-76"><span class="mw-cite-backlink"><b><a href="#cite_ref-Hiltgen-Paterson-Brandestini_1996_76-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHiltgenPatersonBrandestini1996" class="citation journal cs1">Hiltgen, Alain P.; Paterson, Kenneth G.; Brandestini, Marco (September 1996). "Single-Track Gray Codes". <i><a href="IEEE_Transactions_on_Information_Theory" title="IEEE Transactions on Information Theory">IEEE Transactions on Information Theory</a></i>. <b>42</b> (5): <span class="nowrap">1555–</span>1561. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2F18.532900">10.1109/18.532900</a>. <a href="Zbl_(identifier)" class="mw-redirect" title="Zbl (identifier)">Zbl</a>&nbsp;<a rel="nofollow" class="external text" href="https://zbmath.org/?format=complete&amp;q=an:857.94007">857.94007</a>.</cite></span>
</li>
<li id="cite_note-Hiltgen-Paterson_2001-77"><span class="mw-cite-backlink"><b><a href="#cite_ref-Hiltgen-Paterson_2001_77-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHiltgenPaterson2001" class="citation journal cs1">Hiltgen, Alain P.; Paterson, Kenneth G. (September 2001). <a rel="nofollow" class="external text" href="http://www.hpl.hp.com/techreports/2000/HPL-2000-81.pdf">"Single-Track Circuit Codes"</a> <span class="cs1-format">(PDF)</span>. <i><a href="IEEE_Transactions_on_Information_Theory" title="IEEE Transactions on Information Theory">IEEE Transactions on Information Theory</a></i>. <b>47</b> (6): <span class="nowrap">2587–</span>2595. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.10.8218">10.1.1.10.8218</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2F18.945274">10.1109/18.945274</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180115013155/http://www.hpl.hp.com/techreports/2000/HPL-2000-81.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2018-01-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-15</span></span>.</cite></span>
</li>
<li id="cite_note-Etzion-Schwartz_1999-78"><span class="mw-cite-backlink"><b><a href="#cite_ref-Etzion-Schwartz_1999_78-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFEtzionSchwartz1999" class="citation journal cs1 cs1-prop-long-vol">Etzion, Tuvi; Schwartz, Moshe (November 1999) [1998-05-17]. <a rel="nofollow" class="external text" href="http://etzion.net.technion.ac.il/files/2016/02/P54.pdf">"The Structure of Single-Track Gray Codes"</a> <span class="cs1-format">(PDF)</span>. <i><a href="IEEE_Transactions_on_Information_Theory" title="IEEE Transactions on Information Theory">IEEE Transactions on Information Theory</a></i>. IT-45 (7): <span class="nowrap">2383–</span>2396. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.14.8333">10.1.1.14.8333</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2F18.796379">10.1109/18.796379</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180115022531/http://etzion.net.technion.ac.il/files/2016/02/P54.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2018-01-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-15</span></span>.</cite> <a rel="nofollow" class="external text" href="https://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-info.cgi?1998/CS/CS0937">Technical Report CS0937 </a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20181215171438/http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-info.cgi?1998/CS/CS0937">Archived</a> 2018-12-15 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a></span>
</li>
<li id="cite_note-Sillke_1997-79"><span class="mw-cite-backlink"><b><a href="#cite_ref-Sillke_1997_79-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSillke1997" class="citation web cs1">Sillke, Torsten (1997) [1993-03-01]. <a rel="nofollow" class="external text" href="http://www.mathematik.uni-bielefeld.de/~sillke/PROBLEMS/gray">"Gray-Codes with few tracks (a question of Marco Brandestini)"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20171029202303/https://www.math.uni-bielefeld.de/~sillke/PROBLEMS/gray">Archived</a> from the original on 2017-10-29<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-10-29</span></span>.</cite></span>
</li>
<li id="cite_note-Etzion-Paterson_1996-80"><span class="mw-cite-backlink">^ <a href="#cite_ref-Etzion-Paterson_1996_80-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Etzion-Paterson_1996_80-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFEtzionPaterson1996" class="citation journal cs1 cs1-prop-long-vol">Etzion, Tuvi; Paterson, Kenneth G. (May 1996). <a rel="nofollow" class="external text" href="http://etzion.net.technion.ac.il/files/2016/02/P36.pdf">"Near Optimal Single-Track Gray Codes"</a> <span class="cs1-format">(PDF)</span>. <i><a href="IEEE_Transactions_on_Information_Theory" title="IEEE Transactions on Information Theory">IEEE Transactions on Information Theory</a></i>. IT-42 (3): <span class="nowrap">779–</span>789. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.14.1527">10.1.1.14.1527</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2F18.490544">10.1109/18.490544</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20161030214251/http://etzion.net.technion.ac.il/files/2016/02/P36.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2016-10-30<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-04-08</span></span>.</cite></span>
</li>
<li id="cite_note-Ruskey_2005-81"><span class="mw-cite-backlink"><b><a href="#cite_ref-Ruskey_2005_81-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFRuskeyWeston2005" class="citation journal cs1"><a href="Frank_Ruskey" title="Frank Ruskey">Ruskey, Frank</a>; Weston, Mark (2005-06-18). <a rel="nofollow" class="external text" href="https://www.combinatorics.org/Surveys/ds5/VennSymmEJC.html">"A Survey of Venn Diagrams: Symmetric Diagrams"</a>. Dynamic Surveys. <i><a href="Electronic_Journal_of_Combinatorics" title="Electronic Journal of Combinatorics">Electronic Journal of Combinatorics</a></i>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.37236%2F26">10.37236/26</a></span>.</cite></span>
</li>
<li id="cite_note-Alciatore-Histand_1999-82"><span class="mw-cite-backlink"><b><a href="#cite_ref-Alciatore-Histand_1999_82-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFAlciatoreHistand1999" class="citation book cs1">Alciatore, David G.; Histand, Michael B. (1999). <a rel="nofollow" class="external text" href="https://mechatronics.colostate.edu/"><i>Mechatronics</i></a>. <a href="McGraw%E2%80%93Hill_Education" class="mw-redirect" title="McGraw–Hill Education">McGraw–Hill Education</a> – Europe. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-07-131444-2</bdi>.</cite></span>
</li>
<li id="cite_note-Experts_Exchange_Williams_2008-83"><span class="mw-cite-backlink"><b><a href="#cite_ref-Experts_Exchange_Williams_2008_83-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilliams2008" class="citation web cs1">Williams, Gary (2008-07-25). <a rel="nofollow" class="external text" href="https://www.experts-exchange.com/questions/23594359/'single-track-gray-code'-sought-for-encoding-360-degrees-with-9-sensors.html#a22127642">"'single track gray code' sought for encoding 360 degrees with 9 sensors"</a>. <i>Experts Exchange</i>.</cite></span>
</li>
<li id="cite_note-Thingiverse_9-Bit_Singletrack_Gray_Code_Rotorary_Encoder-84"><span class="mw-cite-backlink"><b><a href="#cite_ref-Thingiverse_9-Bit_Singletrack_Gray_Code_Rotorary_Encoder_84-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBauer" class="citation web cs1">Bauer, Florian. <a rel="nofollow" class="external text" href="https://www.thingiverse.com/thing:4590077">"9-Bit Absolute Singletrack Gray Code Rotary Encoder"</a>. <i>Thingiverse</i>.</cite></span>
</li>
<li id="cite_note-Krishna_2008-85"><span class="mw-cite-backlink"><b><a href="#cite_ref-Krishna_2008_85-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKrishna2008" class="citation web cs1">Krishna (2008-05-11). <a rel="nofollow" class="external text" href="https://www.dsprelated.com/showthread/comp.dsp/96917-1.php">"Gray code for QAM"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20171029192539/https://www.dsprelated.com/showthread/comp.dsp/96917-1.php">Archived</a> from the original on 2017-10-29<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-10-29</span></span>.</cite></span>
</li>
<li id="cite_note-Strang-Dammann-Roeckl-Plass_2009-86"><span class="mw-cite-backlink"><b><a href="#cite_ref-Strang-Dammann-Roeckl-Plass_2009_86-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFStrangDammannRöcklPlass2009" class="citation conference cs1 cs1-prop-foreign-lang-source">Strang, Thomas; Dammann, Armin; Röckl, Matthias; Plass, Simon (October 2009). <a rel="nofollow" class="external text" href="http://elib.dlr.de/60489/3/paper.pdf"><i>Using Gray codes as Location Identifiers</i></a> <span class="cs1-format">(PDF)</span>. <i>6. GI/ITG KuVS Fachgespräch Ortsbezogene Anwendungen und Dienste</i> (in English and German). Oberpfaffenhofen, Germany: Institute of Communications and Navigation, <a href="German_Aerospace_Center" title="German Aerospace Center">German Aerospace Center</a> (DLR). <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.398.9164">10.1.1.398.9164</a></span>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150501063457/http://elib.dlr.de/60489/3/paper.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2015-05-01<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-12-16</span></span>.</cite> (5/8 pages) <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20201216231728/https://elib.dlr.de/60489/2/Strang_Thomas.pdf">[10]</a>
<ul><li><cite id="CITEREFThomas_Strang2009" class="citation web cs1 cs1-prop-foreign-lang-source">Thomas Strang; et&nbsp;al. (October 2009). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200903200722/https://www.researchgate.net/profile/Simon_Plass/publication/225003251_Using_Gray_codes_as_Location_Identifiers/links/02e7e53a733e49b2f6000000/Using-Gray-codes-as-Location-Identifiers.pdf">"Using Gray codes as Location Identifiers"</a> <span class="cs1-format">(PDF)</span>. <i>ResearchGate</i> (Abstract) (in German and English). Archived from <a rel="nofollow" class="external text" href="https://www.researchgate.net/publication/225003251">the original</a> on 2020-09-03.</cite></li></ul>
</span></li>
<li id="cite_note-Greferath_2009-87"><span class="mw-cite-backlink"><b><a href="#cite_ref-Greferath_2009_87-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGreferath2009" class="citation book cs1">Greferath, Marcus (2009). "An Introduction to Ring-Linear Coding Theory". In Sala, Massimiliano; Mora, Teo; Perret, Ludovic; Sakata, Shojiro; Traverso, Carlo (eds.). <span class="id-lock-limited" title="Free access subject to limited trial, subscription normally required"><a rel="nofollow" class="external text" href="https://archive.org/details/grbnerbasescodin00sala"><i>Gröbner Bases, Coding, and Cryptography</i></a></span>. <a href="Springer_Science_%26_Business_Media" class="mw-redirect" title="Springer Science &amp; Business Media">Springer Science &amp; Business Media</a>. p.&nbsp;<a rel="nofollow" class="external text" href="https://archive.org/details/grbnerbasescodin00sala/page/n226">220</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-540-93806-4</bdi>.</cite></span>
</li>
<li id="cite_note-Hazewinkel-Sole_2016-88"><span class="mw-cite-backlink"><b><a href="#cite_ref-Hazewinkel-Sole_2016_88-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSolé2016" class="citation book cs1">Solé, Patrick (2016). <a rel="nofollow" class="external text" href="https://www.encyclopediaofmath.org/index.php/Kerdock_and_Preparata_codes">"Kerdock and Preparata codes"</a>. In <a href="Michiel_Hazewinkel" title="Michiel Hazewinkel">Hazewinkel, Michiel</a> (ed.). <i><a href="Encyclopedia_of_Mathematics" title="Encyclopedia of Mathematics">Encyclopedia of Mathematics</a></i>. <a href="Springer_Science%2BBusiness_Media" title="Springer Science+Business Media">Springer Science+Business Media</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-4020-0609-8</bdi>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20171029191032/https://www.encyclopediaofmath.org/index.php/Kerdock_and_Preparata_codes">Archived</a> from the original on 2017-10-29.</cite></span>
</li>
<li id="cite_note-Spaulding_1965-89"><span class="mw-cite-backlink"><b><a href="#cite_ref-Spaulding_1965_89-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSpaulding1965b" class="citation book cs1">Spaulding, Carl P. (1965-07-12). <i>How to Use Shaft Encoders</i>. Monrovia, California, USA: Datex Corporation.</cite> (85 pages)</span>
</li>
<li id="cite_note-Wheeler_1969-90"><span class="mw-cite-backlink">^ <a href="#cite_ref-Wheeler_1969_90-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Wheeler_1969_90-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWheeler1969" class="citation book cs1">Wheeler, Edwin L. (1969-12-30) [1968-04-05]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/f0/c0/60/9c3231f7e8ed44/US3487460.pdf"><i>Analog to digital encoder</i></a> <span class="cs1-format">(PDF)</span>. New York, USA: Conrac Corporation. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US3487460A">U.S. patent 3487460A</a></span>. Serial No. 719026 (397812). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200805102804/https://patentimages.storage.googleapis.com/f0/c0/60/9c3231f7e8ed44/US3487460.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-08-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-21</span></span>. p.&nbsp;5, left column 9, rows 15–22: <q>[…] The <a href="MOA-Gillham_code" class="mw-redirect" title="MOA-Gillham code">MOA-GILLHAM code</a> is essentially the combination of the Gray code discussed thereinabove and the well known <a href="#Datex">Datex code</a>; the Datex code is disclosed in U.S. Patent <a href="#CITEREFSpaulding1965a">3,165,731</a>. The arrangement is such that the Datex code defines the bits for the units count of the encoder and the Gray code defines the bits for each of the higher order decades, the tens, hundreds, etc. […]</q></cite> (11 pages)</span>
</li>
<li id="cite_note-Dokter-Steinhauer_1973-91"><span class="mw-cite-backlink">^ <a href="#cite_ref-Dokter-Steinhauer_1973_91-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1973_91-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1973_91-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1973_91-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1973_91-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1973_91-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFDokterSteinhauer1973" class="citation book cs1">Dokter, Folkert; Steinhauer, Jürgen (1973-06-18). "2.4. Coding numbers in the binary system". <i>Digital Electronics</i>. Philips Technical Library (PTL) / Macmillan Education (Reprint of 1st English&nbsp;ed.). Eindhoven, Netherlands: <a href="The_Macmillan_Press_Ltd." class="mw-redirect" title="The Macmillan Press Ltd.">The Macmillan Press Ltd.</a> / <a href="N._V._Philips'_Gloeilampenfabrieken" class="mw-redirect" title="N. V. Philips' Gloeilampenfabrieken">N. V. Philips' Gloeilampenfabrieken</a>. pp.&nbsp;32, 39, <span class="nowrap">50–</span>53. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-1-349-01417-0">10.1007/978-1-349-01417-0</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-349-01419-4</bdi>. <a href="SBN_(identifier)" class="mw-redirect" title="SBN (identifier)">SBN</a>&nbsp;<bdi>333-13360-9</bdi>. p.&nbsp;53: <q>[…] The <a href="#Datex">Datex code</a> […] uses the <a href="#O'Brien_II">O'Brien code II</a> within each decade, and reflected decimal numbers for the decimal transitions. For further processing, code conversion to the natural decimal notation is necessary. Since the O'Brien II code forms a <a href="9s_complement" class="mw-redirect" title="9s complement">9s complement</a>, this does not give rise to particular difficulties: whenever the code word for the tens represents an odd number, the code words for the decimal units are given as the 9s complements by inversion of the fourth binary digit. […]</q></cite></span>
</li>
<li id="cite_note-Dokter-Steinhauer_1975-92"><span class="mw-cite-backlink">^ <a href="#cite_ref-Dokter-Steinhauer_1975_92-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1975_92-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1975_92-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1975_92-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Dokter-Steinhauer_1975_92-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFDokterSteinhauer1975" class="citation book cs1 cs1-prop-foreign-lang-source">Dokter, Folkert; Steinhauer, Jürgen (1975) [1969]. "2.4.4.6. Einschrittige Kodes". <i>Digitale Elektronik in der Meßtechnik und Datenverarbeitung: Theoretische Grundlagen und Schaltungstechnik</i>. Philips Fachbücher (in German). Vol.&nbsp;I (improved and extended 5th&nbsp;ed.). Hamburg, Germany: <a href="Deutsche_Philips_GmbH" class="mw-redirect" title="Deutsche Philips GmbH">Deutsche Philips GmbH</a>. pp.&nbsp;41, 48, 51, 58, <span class="nowrap">60–</span>61. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>3-87145-272-6</bdi>.</cite> (xii+327+3 pages)</span>
</li>
<li id="cite_note-Varec_1954-93"><span class="mw-cite-backlink"><b><a href="#cite_ref-Varec_1954_93-0">^</a></b></span> <span class="reference-text"><cite class="citation journal cs1"><a rel="nofollow" class="external text" href="https://books.google.com/books?id=B2Q7AAAAMAAJ&amp;q=%22Varec+pulse+code%22">"…accurate liquid level metering – at ANY DISTANCE!"</a>. <i>Petroleum Refiner</i> (Advertisement). <b>33</b> (9). <a href="Gulf_Publishing_Company" title="Gulf Publishing Company">Gulf Publishing Company</a>: 368. September 1954. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0096-6517">0096-6517</a>. p.&nbsp;368: <q>[…] The complete dispatching operation, gauging, and remote control is integrated into one single unitized system when a "Varec" Pulse Code Telemetering System is installed. […]</q></cite></span>
</li>
<li id="cite_note-Bishup-Repeta-Giarrizzo_1963-94"><span class="mw-cite-backlink"><b><a href="#cite_ref-Bishup-Repeta-Giarrizzo_1963_94-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBishupRepetaGiarrizzo1968" class="citation web cs1">Bishup, Bernard W.; Repeta, Anthony A.; Giarrizzo, Frank C. (1968-08-13) [1963-04-03]. <a rel="nofollow" class="external text" href="https://patents.google.com/patent/US3397386A/en">"Telemetering and supervisory control system having normally continuous telemetering signals"</a>. <a href="Leeds_%26_Northrup" title="Leeds &amp; Northrup">Leeds and Northrup Co.</a> US3397386A.</cite> <a rel="nofollow" class="external autonumber" href="https://patentimages.storage.googleapis.com/c8/f3/cc/936fef75655a2c/US3397386.pdf">[11]</a></span>
</li>
<li id="cite_note-Whessoe_1993-95"><span class="mw-cite-backlink"><b><a href="#cite_ref-Whessoe_1993_95-0">^</a></b></span> <span class="reference-text"><cite class="citation book cs1">"Encoder Pulse Format". <a rel="nofollow" class="external text" href="https://www.varec.com/web/wp-content/uploads/2018/05/IOM016_1900.pdf"><i>Installation and Operations Manual for the Model 1900 Micro 4-Wire Transmitter</i></a> <span class="cs1-format">(PDF)</span>. Cypress, California, USA: <a href="Whessoe_Varec%2C_Inc." class="mw-redirect" title="Whessoe Varec, Inc.">Whessoe Varec, Inc.</a> January 1993 [1991-07-01]. pp.&nbsp;<span class="nowrap">04-4 –</span> <span class="nowrap">04-8</span>. 33-08461. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200516191438/https://www.varec.com/web/wp-content/uploads/2018/05/IOM016_1900.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-05-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-16</span></span>.</cite> (38 pages) (NB. Position 5 for "Inches" on page 04-8 should read "0111" rather than "1111".)</span>
</li>
<li id="cite_note-Emerson-96"><span class="mw-cite-backlink"><b><a href="#cite_ref-Emerson_96-0">^</a></b></span> <span class="reference-text"><cite class="citation book cs1">"2.2.3.3 MSP Level Data Format". <a rel="nofollow" class="external text" href="https://www.emerson.com/documents/automation/manuals-guides-application-notes-varec-model-1900-protocol-ras-en-133360.pdf"><i>Varec Model 1900 – Micro 4-Wire Transmitter (BSAP to Mark / Space Protocol (MSP)) – Application Notes</i></a> <span class="cs1-format">(PDF)</span>. <a href="Emerson_Electric" title="Emerson Electric">Emerson Electric</a>. pp.&nbsp;<span class="nowrap">11–</span>14. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200516183338/https://www.emerson.com/documents/automation/manuals-guides-application-notes-varec-model-1900-protocol-ras-en-133360.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-05-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-16</span></span>.</cite> (vi+33 pages)</span>
</li>
<li id="cite_note-Lucal_1959-97"><span class="mw-cite-backlink">^ <a href="#cite_ref-Lucal_1959_97-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Lucal_1959_97-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFLucal1959" class="citation journal cs1">Lucal, Harold M. (December 1959). "Arithmetic Operations for Digital Computers Using a Modified Reflected Binary". <i><a href="IRE_Transactions_on_Electronic_Computers" class="mw-redirect" title="IRE Transactions on Electronic Computers">IRE Transactions on Electronic Computers</a></i>. <b>EC-8</b> (4): <span class="nowrap">449–</span>458. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTEC.1959.5222057">10.1109/TEC.1959.5222057</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0367-9950">0367-9950</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:206673385">206673385</a>.</cite> (10 pages)</span>
</li>
<li id="cite_note-Sellers-Hsiao-Bearnson_1968-98"><span class="mw-cite-backlink">^ <a href="#cite_ref-Sellers-Hsiao-Bearnson_1968_98-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Sellers-Hsiao-Bearnson_1968_98-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFSellers,_Jr.HsiaoBearnson1968" class="citation book cs1">Sellers, Jr., Frederick F.; Hsiao, Mu-Yue; Bearnson, Leroy W. (November 1968). <i>Error Detecting Logic for Digital Computers</i> (1st&nbsp;ed.). New York, USA: <a href="McGraw-Hill_Book_Company" class="mw-redirect" title="McGraw-Hill Book Company">McGraw-Hill Book Company</a>. pp.&nbsp;<span class="nowrap">152–</span>164. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/68-16491">68-16491</a>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/439460">439460</a>.</cite></span>
</li>
<li id="cite_note-Wightman_1972-100"><span class="mw-cite-backlink">^ <a href="#cite_ref-Wightman_1972_100-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Wightman_1972_100-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Wightman_1972_100-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWightman1972" class="citation book cs1">Wightman, Eric Jeffrey (1972). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=8WEhBQAAQBAJ&amp;pg=PA122">"Chapter 6. Displacement measurement"</a>. <a rel="nofollow" class="external text" href="https://books.google.com/books?id=8WEhBQAAQBAJ"><i>Instrumentation in Process Control</i></a> (1&nbsp;ed.). London, UK: <a href="Butterworth_%26_Co_(Publishers)_Ltd" class="mw-redirect" title="Butterworth &amp; Co (Publishers) Ltd">Butterworth &amp; Co (Publishers) Ltd</a>. pp.&nbsp;<span class="nowrap">122–</span>123. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-408-70293-1</bdi>. p.&nbsp;122–123: <q>[…] Other forms of code are also well known. Among these are the <a href="Royal_Radar_Establishment" title="Royal Radar Establishment">Royal Radar Establishment</a> code; The <a href="Excess_Three_decimal_code" class="mw-redirect" title="Excess Three decimal code">Excess Three decimal code</a>; <a href="Gillham_code" title="Gillham code">Gillham code</a> which is recommended by <a href="ICAO" class="mw-redirect" title="ICAO">ICAO</a> for automatic height transmission for <a href="Air_traffic_control" title="Air traffic control">air traffic control</a> purposes; the <a href="Petherick_code" class="mw-redirect" title="Petherick code">Petherick code</a>, and the <a href="Leslie_and_Russell_code" class="mw-redirect" title="Leslie and Russell code">Leslie and Russell code</a> of the <a href="National_Engineering_Laboratory" title="National Engineering Laboratory">National Engineering Laboratory</a>. Each has its particular merits and they are offered as options by various encoder manufacturers. […]</q></cite> (12+367+5 pages)</span>
</li>
<li id="cite_note-Phillips_1998-101"><span class="mw-cite-backlink"><b><a href="#cite_ref-Phillips_1998_101-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFPhillips2012" class="citation web cs1 cs1-prop-unfit">Phillips, Darryl (2012-07-26) [1998]. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20120726003224/http://www.airsport-corp.com/modecascii.txt">"Altitude – MODEC ASCII"</a>. AirSport Avionics. Archived from the original on 2012-07-26.</cite></span>
</li>
<li id="cite_note-Stewart_2010-102"><span class="mw-cite-backlink"><b><a href="#cite_ref-Stewart_2010_102-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFStewart2010" class="citation web cs1">Stewart, K. (2010-12-03). <a rel="nofollow" class="external text" href="https://www.ccsinfo.com/forum/viewtopic.php?p=140960#140960">"Aviation Gray Code: Gillham Code Explained"</a>. Custom Computer Services (CCS). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180116184525/http://www.ccsinfo.com/forum/viewtopic.php?p=140960">Archived</a> from the original on 2018-01-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-Leslie-Russell_1964-103"><span class="mw-cite-backlink"><b><a href="#cite_ref-Leslie-Russell_1964_103-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFLeslieRussell1964" class="citation book cs1">Leslie, William "Bill" H. P.; Russell, A. (1964). <i>A cyclic progressive decimal code for simple translation to decimal and analogue outputs</i> (Report). East Kilbride, Glasgow, UK: <a href="National_Engineering_Laboratory" title="National Engineering Laboratory">National Engineering Laboratory</a>. NEL Report 129.</cite> (17 pages)</span>
</li>
<li id="cite_note-Leslie_1974-104"><span class="mw-cite-backlink"><b><a href="#cite_ref-Leslie_1974_104-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFLeslie1974" class="citation book cs1">Leslie, William "Bill" H. P. (1974). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220407160744/https://books.google.com/books?id=bFVdDwAAQBAJ&amp;pg=PA215">"The work on NC at NEL"</a>. In Koenigsberger, Franz; Tobias, Stephen Albert (eds.). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=bFVdDwAAQBAJ&amp;pg=PA215"><i>Proceedings of the Fourteenth International Machine Tool Design and Research Conference, 12–14 September 1973</i></a>. <a href="The_Macmillan_Press_Ltd" class="mw-redirect" title="The Macmillan Press Ltd">The Macmillan Press Ltd</a>. pp.&nbsp;215–224 [215, 217]. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-1-349-01921-2_30">10.1007/978-1-349-01921-2_30</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-34901921-2</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/73-16545">73-16545</a>. <a href="SBN_(identifier)" class="mw-redirect" title="SBN (identifier)">SBN</a>&nbsp;<bdi>333-14913-0</bdi>. Archived from <a rel="nofollow" class="external text" href="https://link.springer.com/chapter/10.1007/978-1-349-01921-2_30">the original</a> on 2022-04-07<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-21</span></span>.</cite></span>
</li>
<li id="cite_note-Hoklas_1989-105"><span class="mw-cite-backlink"><b><a href="#cite_ref-Hoklas_1989_105-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHoklas1989" class="citation web cs1 cs1-prop-foreign-lang-source">Hoklas, Archibald (1989-09-06) [1988-04-29]. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180118015239/https://depatisnet.dpma.de/DepatisNet/depatisnet/DD000000271603A1_all_pages.pdf?window=1&amp;space=menu&amp;content=download_doc_verify&amp;action=download_doc&amp;docid=DD000000271603A1&amp;so=asc&amp;sf=vn&amp;firstdoc=0&amp;struct=&amp;Cl=2&amp;Bi=1&amp;Ab=1&amp;De=2&amp;Dr=5&amp;Pts=&amp;Pa=&amp;We=&amp;Sr=&amp;Eam=&amp;Cor=&amp;Aa=&amp;NrFaxPages=5&amp;pdfpage=2&amp;pdfmatrix=1x1&amp;origin=pdf_window&amp;verify_str=null">"Abtastvorrichtung zur digitalen Weg- oder Winkelmessung"</a> <span class="cs1-format">(PDF)</span> (in German). VEB Schiffselektronik Johannes Warnke. GDR Patent DD271603A1. WP H 03 M / 315 194 8. Archived from <a rel="nofollow" class="external text" href="https://depatisnet.dpma.de/DepatisNet/depatisnet/DD000000271603A1_all_pages.pdf?window=1&amp;space=menu&amp;content=download_doc_verify&amp;action=download_doc&amp;docid=DD000000271603A1&amp;so=asc&amp;sf=vn&amp;firstdoc=0&amp;struct=&amp;Cl=2&amp;Bi=1&amp;Ab=1&amp;De=2&amp;Dr=5&amp;Pts=&amp;Pa=&amp;We=&amp;Sr=&amp;Eam=&amp;Cor=&amp;Aa=&amp;NrFaxPages=5&amp;pdfpage=2&amp;pdfmatrix=1x1&amp;origin=pdf_window&amp;verify_str=null">the original</a> <span class="cs1-format">(PDF)</span> on 2018-01-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-18</span></span> – via DEPATIS.</cite> <a rel="nofollow" class="external autonumber" href="https://depatisnet.dpma.de/DepatisNet/depatisnet?action=bibdat&amp;docid=DD000000271603A1">[12]</a> <a rel="nofollow" class="external autonumber" href="https://depatisnet.dpma.de/DepatisNet/depatisnet?action=pdf&amp;docid=DD000000271603A1">[13]</a></span>
</li>
<li id="cite_note-Hoklas_2005_1-106"><span class="mw-cite-backlink">^ <a href="#cite_ref-Hoklas_2005_1_106-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-8"><sup><i><b>i</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-9"><sup><i><b>j</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_1_106-10"><sup><i><b>k</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFHoklas2005" class="citation web cs1">Hoklas, Archibald (2005). <a rel="nofollow" class="external text" href="http://www.ahok.de/en/hoklas-code.html">"Gray code – Unit distance code"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180115012854/http://www.ahok.de/en/hoklas-code.html">Archived</a> from the original on 2018-01-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-15</span></span>.</cite></span>
</li>
<li id="cite_note-Hoklas_2005_2-107"><span class="mw-cite-backlink">^ <a href="#cite_ref-Hoklas_2005_2_107-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_2_107-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_2_107-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_2_107-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Hoklas_2005_2_107-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFHoklas2005" class="citation web cs1 cs1-prop-foreign-lang-source">Hoklas, Archibald (2005). <a rel="nofollow" class="external text" href="http://www.ahok.de/dt/hoklas-code.html">"Gray-Kode – Einschrittiger Abtastkode"</a> (in German). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180115012827/http://www.ahok.de/dt/hoklas-code.html">Archived</a> from the original on 2018-01-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-01-15</span></span>.</cite></span>
</li>
<li id="cite_note-Petherick-Hopkins_1958-108"><span class="mw-cite-backlink"><b><a href="#cite_ref-Petherick-Hopkins_1958_108-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFPetherickHopkins1958" class="citation book cs1">Petherick, Edward John; Hopkins, A. J. (1958). <i>Some Recently Developed Digital Devices for Encoding the Rotations of Shafts</i> (Technical Note MS21). Farnborough, UK: <a href="Royal_Aircraft_Establishment" title="Royal Aircraft Establishment">Royal Aircraft Establishment</a> (RAE).</cite></span>
</li>
<li id="cite_note-Baumgartner_1963-109"><span class="mw-cite-backlink"><b><a href="#cite_ref-Baumgartner_1963_109-0">^</a></b></span> <span class="reference-text"><cite class="citation magazine cs1 cs1-prop-foreign-lang-source"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20200521211656/https://www.posital.com/media/posital_media/documents/TechnischeMitteilung_May1963.pdf">"Digitizer als Analog-Digital-Wandler in der Steuer-, Meß- und Regeltechnik"</a> <span class="cs1-format">(PDF)</span>. <i>Technische Mitteilungen</i>. Relais, elektronische Geräte, Steuerungen (in German). No.&nbsp;13. Cologne-Niehl, Germany: Franz Baumgartner (FraBa). May 1963. pp.&nbsp;<span class="nowrap">1–</span>2. Archived from <a rel="nofollow" class="external text" href="https://www.posital.com/media/posital_media/documents/TechnischeMitteilung_May1963.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2020-05-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-21</span></span>. pp.&nbsp;<span class="nowrap">1–</span>2: <q>[…] Die Firma Harrison Reproduction Equipment, Farnborough/England […] hat in jahrelanger Entwicklung in Zusammenarbeit mit der Britischen Luftwaffe und britischen Industriebetrieben den mechanischen Digitizer […] zu einer technischen Reife gebracht, die fast allen Anforderungen […] genügt. […] Um bei der dezimalen Entschlüsselung des verwendeten Binärcodes zu eindeutigen und bei der Übergabe von einer Dezimalstelle zur anderen in der Reihenfolge immer richtigen Ergebnissen zu kommen, wurde ein spezieller Code entwickelt, der jede Möglichkeit einer Fehlaussage durch sein Prinzip ausschließt und der außerdem durch seinen Aufbau eine relativ einfache Entschlüsselung erlaubt. Der Code basiert auf dem <a href="#Petherick">Petherick-Code</a>. […]</q></cite> (4 pages)</span>
</li>
<li id="cite_note-Charnley-Bidgood-Boardman_1965-110"><span class="mw-cite-backlink">^ <a href="#cite_ref-Charnley-Bidgood-Boardman_1965_110-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Charnley-Bidgood-Boardman_1965_110-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFCharnleyBidgoodBoardman1965" class="citation journal cs1">Charnley, C. J.; Bidgood, R. E.; Boardman, G. E. T. (October 1965). "The Design of a Pneumatic Position Encoder". <i>IFAC Proceedings Volumes</i>. <b>2</b> (3). The College of Aeronautics, Cranfield, Bedford, England: <span class="nowrap">75–</span>88. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1016%2FS1474-6670%2817%2968955-9">10.1016/S1474-6670(17)68955-9</a>. Chapter 1.5.</cite></span>
</li>
<li id="cite_note-Hollingdale_1958-112"><span class="mw-cite-backlink"><b><a href="#cite_ref-Hollingdale_1958_112-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFHollingdale1958" class="citation book cs1">Hollingdale, Stuart H. (1958-09-19). <a rel="nofollow" class="external text" href="http://www.chilton-computing.org.uk/acl/literature/manuals/nottingham/p014.htm">"Session 14. Data Processing"</a>. <a rel="nofollow" class="external text" href="http://www.chilton-computing.org.uk/acl/literature/manuals/nottingham/contents.htm"><i>Applications of Computers</i></a> (Conference paper). Atlas – Application of Computers, University of Nottingham 15–19 September 1958. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200525151358/http://www.chilton-computing.org.uk/acl/literature/manuals/nottingham/p014.htm">Archived</a> from the original on 2020-05-25<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-25</span></span>.</cite></span>
</li>
<li id="cite_note-O'Brien_1955-113"><span class="mw-cite-backlink">^ <a href="#cite_ref-O'Brien_1955_113-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-O'Brien_1955_113-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-O'Brien_1955_113-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFO'Brien1956" class="citation journal cs1">O'Brien, Joseph A. (May 1956) [1955-11-15, 1955-06-23]. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200518075301/https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html">"Cyclic Decimal Codes for Analogue to Digital Converters"</a>. <i><a href="Transactions_of_the_American_Institute_of_Electrical_Engineers%2C_Part_I%3A_Communication_and_Electronics" class="mw-redirect" title="Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics">Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics</a></i>. <b>75</b> (2). Bell Telephone Laboratories, Whippany, New Jersey, USA: <span class="nowrap">120–</span>122. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTCE.1956.6372498">10.1109/TCE.1956.6372498</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0097-2452">0097-2452</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:51657314">51657314</a>. Paper 56-21. Archived from <a rel="nofollow" class="external text" href="https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html">the original</a> on 2020-05-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-18</span></span>.</cite> (3 pages) (NB. This paper was prepared for presentation at the AIEE Winter General Meeting, New York, USA, 1956-01-30 to 1956-02-03.)</span>
</li>
<li id="cite_note-Steinbuch_1962-114"><span class="mw-cite-backlink">^ <a href="#cite_ref-Steinbuch_1962_114-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-Steinbuch_1962_114-8"><sup><i><b>i</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFSteinbuch1962" class="citation book cs1 cs1-prop-location-test cs1-prop-foreign-lang-source"><a href="Karl_W._Steinbuch" class="mw-redirect" title="Karl W. Steinbuch">Steinbuch, Karl W.</a>, ed. (1962). Written at Karlsruhe, Germany. <i>Taschenbuch der Nachrichtenverarbeitung</i> (in German) (1&nbsp;ed.). Berlin / Göttingen / New York: <a href="Springer-Verlag_OHG" class="mw-redirect" title="Springer-Verlag OHG">Springer-Verlag OHG</a>. pp.&nbsp;<span class="nowrap">71–</span>74, 97, <span class="nowrap">761–</span>764, 770, <span class="nowrap">1080–</span>1081. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/62-14511">62-14511</a>.</cite></span>
</li>
<li id="cite_note-Steinbuch-Weber-Heinemann_1974-115"><span class="mw-cite-backlink">^ <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-Steinbuch-Weber-Heinemann_1974_115-8"><sup><i><b>i</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFSteinbuchWeberHeinemann1974" class="citation book cs1 cs1-prop-foreign-lang-source"><a href="Karl_W._Steinbuch" class="mw-redirect" title="Karl W. Steinbuch">Steinbuch, Karl W.</a>; Weber, Wolfgang; Heinemann, Traute, eds. (1974) [1967]. <i>Taschenbuch der Informatik – Band II – Struktur und Programmierung von EDV-Systemen</i>. Taschenbuch der Nachrichtenverarbeitung (in German). Vol.&nbsp;2 (3&nbsp;ed.). Berlin, Germany: <a href="Springer_Verlag" class="mw-redirect" title="Springer Verlag">Springer Verlag</a>. pp.&nbsp;<span class="nowrap">98–</span>100. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>3-540-06241-6</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/73-80607">73-80607</a>.</cite></span>
</li>
<li id="cite_note-Foss_1954_1-117"><span class="mw-cite-backlink"><b><a href="#cite_ref-Foss_1954_1_117-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFFoss1960" class="citation web cs1">Foss, Frederic A. (1960-12-27) [1954-12-17]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf">"Control Systems"</a> <span class="cs1-format">(PDF)</span>. <a href="International_Business_Machines_Corp" class="mw-redirect" title="International Business Machines Corp">International Business Machines Corp</a>. Fig. 7, Fig. 8, Fig. 11. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2966670A">U.S. patent 2966670A</a></span>. Serial No. 475945. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200621145238/https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-06-21<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-08-05</span></span>.</cite> (14 pages) (NB. The author called his code 2*-4-2-1 (+9-±7-±3-±1) reflected decimal code.)</span>
</li>
<li id="cite_note-Foss_1954_2-118"><span class="mw-cite-backlink"><b><a href="#cite_ref-Foss_1954_2_118-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFFoss1954" class="citation journal cs1">Foss, Frederic A. (December 1954). "The Use of a Reflected Code in Digital Control Systems". <i><a href="IRE_Transactions_on_Electronic_Computers" class="mw-redirect" title="IRE Transactions on Electronic Computers">IRE Transactions on Electronic Computers</a></i>. <b>EC-3</b> (4): <span class="nowrap">1–</span>6. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FIREPGELC.1954.6499244">10.1109/IREPGELC.1954.6499244</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/2168-1740">2168-1740</a>.</cite> (6 pages)</span>
</li>
<li id="cite_note-Evans_1958-119"><span class="mw-cite-backlink"><b><a href="#cite_ref-Evans_1958_119-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFEvans1958" class="citation journal cs1 cs1-prop-long-vol">Evans, David Silvester (1958). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=mwJvieqKGFsC&amp;q=%22Watts+code%22">"[title unknown]"</a>. <i>Transactions</i>. <span class="nowrap">10–</span>12. Institute of Measurement and Control: 87.</cite> (NB. The Watts code was called W.R.D. code or Watts Reflected Decimal to distinguish it from other codes used at <a href="Hilger_%26_Watts_Ltd." class="mw-redirect" title="Hilger &amp; Watts Ltd.">Hilger &amp; Watts Ltd.</a>)</span>
</li>
<li id="cite_note-Benjamin-Nicholls_1963-120"><span class="mw-cite-backlink"><b><a href="#cite_ref-Benjamin-Nicholls_1963_120-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBenjaminNicholls1963" class="citation book cs1">Benjamin, P. W.; Nicholls, G. S. (1963). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=tD5YAAAAYAAJ&amp;pg=PT4">"3.2.2 Electromechanical Digitizers"</a>. <i>Measurement of Neutron Spectra by Semi-Automatic Scanning of Recoil Protons in Photographic Emulsions</i>. <a href="United_Kingdom_Atomic_Energy_Authority" title="United Kingdom Atomic Energy Authority">United Kingdom Atomic Energy Authority</a>, <a href="Atomic_Weapons_Research_Establishment" class="mw-redirect" title="Atomic Weapons Research Establishment">Atomic Weapons Research Establishment</a>, UK: <a href="U.S._Department_of_Energy" class="mw-redirect" title="U.S. Department of Energy">U.S. Department of Energy</a>. pp.&nbsp;<span class="nowrap">8–</span>10, 19. AWRE Report No. NR 5/63.</cite> <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20200525193325/https://books.googleusercontent.com/books/content?req=AKW5QadxAC8d1K6TXnjLMOKRt0wxLI2XEnyvs5b7wXlxCaZ4XdYW6qcmagghi7O1TLA4DL5nybOmiY0ue2ljEH9L2NvnP6Z6vN54dNvpxHnCIK79h1xoamtO5-waq-mDh2BPHJE9eJkmkoUl7uyPvrbWd7gNM8gpQKbx82WI_3gYiZHy-aHdQGQAFOkacvI1Kf52lu4i8_cuMNYztfa--t2eGiIk5ku1bP7T7n378Q2rNZRCMz3JCXeT0EzYNMkJzlpYSiP2FiQ8">[14]</a> (23 pages)</span>
</li>
<li id="cite_note-Klinkowski_1964-121"><span class="mw-cite-backlink"><b><a href="#cite_ref-Klinkowski_1964_121-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKlinkowski1967" class="citation web cs1">Klinkowski, James J. (1967-03-14) [1964-03-23]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/71/6a/f4/044b43b93097e7/US3309695.pdf">"Electronic Diode Matrix Decoder Circuits"</a> <span class="cs1-format">(PDF)</span>. Detroit, Michigan, USA: <a href="Burroughs_Corporation" title="Burroughs Corporation">Burroughs Corporation</a>. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US3309695A">U.S. patent 3309695A</a></span>. Serial No. 353845. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200523144819/https://patentimages.storage.googleapis.com/71/6a/f4/044b43b93097e7/US3309695.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-05-23<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-23</span></span>.</cite> (5 pages) <a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20200805103732/https://patentimages.storage.googleapis.com/97/33/74/aec52610026e59/USRE26780.pdf">[15]</a></span>
</li>
<li id="cite_note-Klinkowski_1966-122"><span class="mw-cite-backlink"><b><a href="#cite_ref-Klinkowski_1966_122-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKlinkowski1970" class="citation web cs1">Klinkowski, James J. (1970-03-31) [1966-12-22]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/65/d6/45/f7837c143fa3da/US3504363.pdf">"Binary-coded decimal signal converter"</a> <span class="cs1-format">(PDF)</span>. Detroit, Michigan, USA: <a href="Burroughs_Corporation" title="Burroughs Corporation">Burroughs Corporation</a>. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US3504363A">U.S. patent 3504363A</a></span>. Serial No. 603926. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200523145655/https://patentimages.storage.googleapis.com/65/d6/45/f7837c143fa3da/US3504363.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-05-23<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-23</span></span>.</cite> (7 pages)</span>
</li>
<li id="cite_note-EDN_1967-123"><span class="mw-cite-backlink"><b><a href="#cite_ref-EDN_1967_123-0">^</a></b></span> <span class="reference-text"><cite class="citation journal cs1">"[title unknown]". <i><a href="Electrical_Design_News" class="mw-redirect" title="Electrical Design News">Electrical Design News</a></i>. <b>12</b>. <a href="Rogers_Publishing_Company" class="mw-redirect" title="Rogers Publishing Company">Rogers Publishing Company</a>. 1967. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0012-7515">0012-7515</a>.</cite> <a rel="nofollow" class="external autonumber" href="https://books.google.com/books?id=MThAAQAAIAAJ&amp;q=%22Watts+code%22+%22Excess-3+Gray+Code%22">[16]</a><a rel="nofollow" class="external autonumber" href="https://books.google.com/books?id=MThAAQAAIAAJ&amp;q=%22Watts+code%22+%22Excess-3+Gray+Code%22">[17]</a></span>
</li>
<li id="cite_note-Toth-Zentai_1979-124"><span class="mw-cite-backlink"><b><a href="#cite_ref-Toth-Zentai_1979_124-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFTóth-Zentai1979" class="citation journal cs1">Tóth-Zentai, Györgyi (1979-10-05). <a rel="nofollow" class="external text" href="https://pp.bme.hu/ee/article/view/4838">"Some Problems Of Angular Rotational Digital Converters"</a>. <i>Periodica Polytechnica Electrical Engineering</i>. <b>23</b> (<span class="nowrap">3–</span>4). Department of Electronics Technology, Technical University, Budapest, Hungary: 265–270 [266]<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-23</span></span>.</cite> <a rel="nofollow" class="external autonumber" href="https://pp.bme.hu/ee/article/download/4838/3943/">[18]</a> (6 pages) (NB. Shows a 6-digit Watts code.)</span>
</li>
<li id="cite_note-Savard_2018-125"><span class="mw-cite-backlink"><b><a href="#cite_ref-Savard_2018_125-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSavard2018" class="citation web cs1">Savard, John J. G. (2018) [2006]. <a rel="nofollow" class="external text" href="http://www.quadibloc.com/comp/cp0203.htm">"Decimal Representations"</a>. <i>quadibloc</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180716101321/http://www.quadibloc.com/comp/cp0203.htm">Archived</a> from the original on 2018-07-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-07-16</span></span>.</cite></span>
</li>
<li id="cite_note-Turvey_1956-126"><span class="mw-cite-backlink">^ <a href="#cite_ref-Turvey_1956_126-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Turvey_1956_126-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFTurvey,_Jr.1958" class="citation web cs1">Turvey, Jr., Frank P. (1958-07-29) [1956-05-17]. <a rel="nofollow" class="external text" href="https://patentimages.storage.googleapis.com/14/07/c6/404dafe27dc829/US2845617.pdf">"Pulse-Count Coder"</a> <span class="cs1-format">(PDF)</span>. Nutley, New Jersey, USA: <a href="International_Telephone_and_Telegraph_Corporation" class="mw-redirect" title="International Telephone and Telegraph Corporation">International Telephone and Telegraph Corporation</a>. <span><a rel="nofollow" class="external text" href="https://patents.google.com/patent/US2845617A">U.S. patent 2845617A</a></span>. Serial No. 585494. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200523115811/https://patentimages.storage.googleapis.com/14/07/c6/404dafe27dc829/US2845617.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-05-23<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-23</span></span>.</cite> (5 pages)</span>
</li>
<li id="cite_note-Glixon_1957-127"><span class="mw-cite-backlink">^ <a href="#cite_ref-Glixon_1957_127-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Glixon_1957_127-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGlixon1957" class="citation journal cs1">Glixon, Harry Robert (March 1957). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=-_5IAQAAIAAJ">"Can You Take Advantage of the Cyclic Binary-Decimal Code?"</a>. <i><a href="Control_Engineering_(magazine)" title="Control Engineering (magazine)">Control Engineering</a></i>. <b>4</b> (3). <a href="Technical_Publishing_Company" class="mw-redirect" title="Technical Publishing Company">Technical Publishing Company</a>, a division of Dun-Donnelley Publishing Corporation, <a href="Dun_%26_Bradstreet_Corp." class="mw-redirect" title="Dun &amp; Bradstreet Corp.">Dun &amp; Bradstreet Corp.</a>: <span class="nowrap">87–</span>91. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0010-8049">0010-8049</a>.</cite> (5 pages)</span>
</li>
<li id="cite_note-Borucki-Dittmann_1971-128"><span class="mw-cite-backlink">^ <a href="#cite_ref-Borucki-Dittmann_1971_128-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Borucki-Dittmann_1971_128-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFBoruckiDittmann1971" class="citation book cs1 cs1-prop-location-test cs1-prop-foreign-lang-source">Borucki, Lorenz; Dittmann, Joachim (1971) [July 1970, 1966, Autumn 1965]. "2.3 Gebräuchliche Codes in der digitalen Meßtechnik". Written at Krefeld / Karlsruhe, Germany. <i>Digitale Meßtechnik: Eine Einführung</i> (in German) (2&nbsp;ed.). Berlin / Heidelberg, Germany: <a href="Springer-Verlag" class="mw-redirect" title="Springer-Verlag">Springer-Verlag</a>. pp.&nbsp;10–23 [12–14]. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-642-80560-8">10.1007/978-3-642-80560-8</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>3-540-05058-2</bdi>. <a href="LCCN_(identifier)" class="mw-redirect" title="LCCN (identifier)">LCCN</a>&nbsp;<a rel="nofollow" class="external text" href="https://lccn.loc.gov/75-131547">75-131547</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-3-642-80561-5</bdi>.</cite> (viii+252 pages) <a rel="nofollow" class="external text" href="https://books.google.com/books?id=NwyCBwAAQBAJ&amp;pg=PA15">1st edition</a> (NB. Like <a href="#CITEREFKämmerer1969">Kämmerer</a>, the authors describe a 6-bit 20-cyclic Glixon code.)</span>
</li>
<li id="cite_note-Kämmerer_1969-129"><span class="mw-cite-backlink">^ <a href="#cite_ref-Kämmerer_1969_129-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Kämmerer_1969_129-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFKämmerer1969" class="citation book cs1 cs1-prop-location-test cs1-prop-interwiki-linked-name cs1-prop-foreign-lang-source"><a href="https://de.wikipedia.org/wiki/Wilhelm_K%C3%A4mmerer" class="extiw external" title="de:Wilhelm Kämmerer">Kämmerer, Wilhelm</a> <span class="cs1-format">[in German]</span> (May 1969). "II.15. Struktur: Informationsdarstellung im Automaten". Written at Jena, Germany. In <a href="https://de.wikipedia.org/wiki/Hans_Fr%C3%BChauf" class="extiw external" title="de:Hans Frühauf">Frühauf, Hans</a> <span class="cs1-format">[in German]</span>; Kämmerer, Wilhelm; Schröder, Kurz; Winkler, Helmut (eds.). <i>Digitale Automaten – Theorie, Struktur, Technik, Programmieren</i>. Elektronisches Rechnen und Regeln (in German). Vol.&nbsp;5 (1&nbsp;ed.). Berlin, Germany: <a href="Akademie-Verlag_GmbH" class="mw-redirect" title="Akademie-Verlag GmbH">Akademie-Verlag GmbH</a>. p.&nbsp;173. License no. 202-100/416/69. Order no. 4666 ES 20 K 3.</cite> (NB. A second edition 1973 exists as well. Like <a href="#CITEREFBoruckiDittmann1971">Borucki and Dittmann</a>, but without naming it Glixon code, the author creates a 20-cyclic tetradic code from Glixon code and a Glixon code variant with inverted high-order bit.)</span>
</li>
<li id="cite_note-Paul_1995-133"><span class="mw-cite-backlink"><b><a href="#cite_ref-Paul_1995_133-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFPaul1995" class="citation web cs1 cs1-prop-foreign-lang-source">Paul, Matthias R. (1995-08-10) [1994]. <a rel="nofollow" class="external text" href="http://www.uni-bonn.de/~uzs180/download/mpbcd102.zip">"Unterbrechungsfreier Schleifencode"</a> [Continuous loop code]. 1.02 (in German)<span class="reference-accessdate">. Retrieved <span class="nowrap">2008-02-11</span></span>.</cite> (NB. The author called this code <span title="German-language text"><i lang="de">Schleifencode</i></span> (English: "loop code"). It differs from Gray BCD code only in the encoding of state 0 to make it a cyclic unit-distance code for full-circle rotatory applications. Avoiding the all-zero code pattern allows for loop self-testing and to use the data lines for uninterrupted power distribution.)</span>
</li>
<li id="cite_note-Klar_1970-135"><span class="mw-cite-backlink"><b><a href="#cite_ref-Klar_1970_135-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKlar1970" class="citation book cs1 cs1-prop-long-vol cs1-prop-foreign-lang-source">Klar, Rainer (1970-02-01). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=QnqVDwAAQBAJ&amp;pg=PA17"><i>Digitale Rechenautomaten – Eine Einführung</i></a> [<i>Digital Computers – An Introduction</i>]. Sammlung Göschen (in German). Vol.&nbsp;1241/1241a (1&nbsp;ed.). Berlin, Germany: <a href="Walter_de_Gruyter_%26_Co." class="mw-redirect" title="Walter de Gruyter &amp; Co.">Walter de Gruyter &amp; Co.</a> / <a href="G._J._G%C3%B6schen'sche_Verlagsbuchhandlung" class="mw-redirect" title="G. J. Göschen'sche Verlagsbuchhandlung">G. J. Göschen'sche Verlagsbuchhandlung</a>. p.&nbsp;17. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>3-11-083160-0</bdi>. . Archiv-Nr. 7990709. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200601100645/https://books.google.de/books?id=QnqVDwAAQBAJ&amp;pg=PA17&amp;lpg=PA17&amp;redir_esc=y">Archived</a> from the original on 2020-06-01<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-04-13</span></span>.</cite> (205 pages) (NB. A 2019 reprint of the first edition is available under <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>3-11002793-3</bdi>, <bdi>978-3-11002793-8</bdi>. A reworked and expanded <a href="#CITEREFKlar1989">4th edition</a> exists as well.)</span>
</li>
<li id="cite_note-Klar_1989-136"><span class="mw-cite-backlink"><b><a href="#cite_ref-Klar_1989_136-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKlar1989" class="citation book cs1 cs1-prop-foreign-lang-source">Klar, Rainer (1989) [1988-10-01]. <i>Digitale Rechenautomaten – Eine Einführung in die Struktur von Computerhardware</i> [<i>Digital Computers – An Introduction into the structure of computer hardware</i>]. Sammlung Göschen (in German). Vol.&nbsp;2050 (4th reworked&nbsp;ed.). Berlin, Germany: <a href="Walter_de_Gruyter_%26_Co." class="mw-redirect" title="Walter de Gruyter &amp; Co.">Walter de Gruyter &amp; Co.</a> p.&nbsp;28. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>3-11011700-2</bdi>.</cite> (320 pages) (NB. The author called this code <span title="German-language text"><i lang="de">Einheitsabstandscode</i></span> (English: "unit-distance code"). By swapping two bit rows and inverting one of them, it can be transferred into the <a href="#O'Brien_II">O'Brien code II</a>, whereas by swapping and inverting two bit rows, it can be transferred into the <a href="#Petherick">Petherick code</a>.)</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239549316">
/* start https://en.wikipedia.org/ */


.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}


/* end https://en.wikipedia.org/ */
</style><div class="refbegin refbegin-columns references-column-width" style="column-width: 30em">
<ul><li><cite id="CITEREFRichards1955" class="citation book cs1">Richards, Richard Kohler (1955). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=BI5QAAAAMAAJ"><i>Arithmetic Operations in Digital Computers</i></a> (5&nbsp;ed.). New York, USA: <a href="D._Van_Nostrand_Co.%2C_Inc." class="mw-redirect" title="D. Van Nostrand Co., Inc.">D. Van Nostrand Co., Inc.</a></cite></li>
<li><cite id="CITEREFRichards1967" class="citation book cs1">Richards, Richard Kohler (1967). <i>Electronic Digital Components and Circuits</i>. <a href="D._Van_Nostrand_Co.%2C_Inc." class="mw-redirect" title="D. Van Nostrand Co., Inc.">D. Van Nostrand Co., Inc.</a> pp.&nbsp;490, <span class="nowrap">500–</span>504, <span class="nowrap">510–</span>511.</cite></li>
<li><cite id="CITEREFBlack2004" class="citation web cs1">Black, Paul E. (2004-02-25). <a rel="nofollow" class="external text" href="https://xlinux.nist.gov/dads/HTML/graycode.html">"Gray code"</a>. <a href="NIST" class="mw-redirect" title="NIST">NIST</a>.</cite></li>
<li><cite id="CITEREFPressTeukolskyVetterlingFlannery2007" class="citation book cs1">Press, William H.; Teukolsky, Saul A.; Vetterling, William T.; Flannery, Brian P. (2007). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20110811154417/http://apps.nrbook.com/empanel/index.html#pg=1166">"Section 22.3. Gray Codes"</a>. <i>Numerical Recipes: The Art of Scientific Computing</i> (3rd&nbsp;ed.). New York, USA: <a href="Cambridge_University_Press" title="Cambridge University Press">Cambridge University Press</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-521-88068-8</bdi>. Archived from <a rel="nofollow" class="external text" href="http://apps.nrbook.com/empanel/index.html#pg=1166">the original</a> on 2011-08-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2011-08-18</span></span>.</cite></li>
<li><cite id="CITEREFSavage1997" class="citation journal cs1"><a href="Carla_Diane_Savage" class="mw-redirect" title="Carla Diane Savage">Savage, Carla Diane</a> (1997). <a rel="nofollow" class="external text" href="http://www4.ncsu.edu/~savage/AVAILABLE_FOR_MAILING/survey.ps">"A Survey of Combinatorial Gray Codes"</a>. <i><a href="SIAM_Review" class="mw-redirect" title="SIAM Review">SIAM Review</a></i>. <b>39</b> (4). <a href="Society_for_Industrial_and_Applied_Mathematics" title="Society for Industrial and Applied Mathematics">Society for Industrial and Applied Mathematics</a> (SIAM): <span class="nowrap">605–</span>629. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1997SIAMR..39..605S">1997SIAMR..39..605S</a>. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a>&nbsp;<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.1924">10.1.1.39.1924</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2FS0036144595295272">10.1137/S0036144595295272</a>. <a href="JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&nbsp;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/2132693">2132693</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:6375360">6375360</a>.</cite></li>
<li><cite id="CITEREFWilf1989" class="citation book cs1"><a href="Herbert_Saul_Wilf" class="mw-redirect" title="Herbert Saul Wilf">Wilf, Herbert Saul</a> (1989). "Chapters 1–3". <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/combinatorialalg0000wilf"><i>Combinatorial algorithms: An update</i></a></span>. <a href="Society_for_Industrial_and_Applied_Mathematics" title="Society for Industrial and Applied Mathematics">Society for Industrial and Applied Mathematics</a> (SIAM). <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-89871-231-9</bdi>.</cite></li>
<li><cite id="CITEREFDewarStevens2012" class="citation book cs1">Dewar, Megan; Stevens, Brett (2012-08-29). <i>Ordering Block Designs – Gray Codes, Universal Cycles and Configuration</i>. CMS Books in Mathematics (1&nbsp;ed.). New York, USA: <a href="Springer_Science%2BBusiness_Media" title="Springer Science+Business Media">Springer Science+Business Media</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-1-4614-4325-4">10.1007/978-1-4614-4325-4</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-46144324-7</bdi>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/1613-5237">1613-5237</a>.</cite></li>
<li><cite id="CITEREFMaxfield2012" class="citation web cs1">Maxfield, Clive "Max" (2012-10-01) [2011-05-28]. <a rel="nofollow" class="external text" href="https://www.eetimes.com/document.asp?doc_id=1278809">"Gray Code Fundamentals"</a>. <i>Design How-To</i>. <a href="EETimes" class="mw-redirect" title="EETimes">EETimes</a>. Part 1. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20171030135842/https://www.eetimes.com/document.asp?doc_id=1278809">Archived</a> from the original on 2017-10-30<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-10-30</span></span>.</cite> <a rel="nofollow" class="external text" href="https://www.eetimes.com/document.asp?doc_id=1278827">Part 2</a> <a rel="nofollow" class="external text" href="https://www.eetimes.com/document.asp?doc_id=1278853">Part 3</a></li>
<li><cite id="CITEREFWarren,_Jr.2013" class="citation book cs1">Warren, Jr., Henry S. (2013). "Chapter 13: Gray Code". <a href="Hacker's_Delight" title="Hacker's Delight"><i>Hacker's Delight</i></a> (2&nbsp;ed.). <a href="Addison_Wesley" class="mw-redirect" title="Addison Wesley">Addison Wesley</a> – <a href="Pearson_Education%2C_Inc." class="mw-redirect" title="Pearson Education, Inc.">Pearson Education, Inc.</a> pp.&nbsp;<span class="nowrap">311–</span>317. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-321-84268-8</bdi>.</cite> (7 pages)</li>
<li><cite id="CITEREFZinovikKroeningChebiryak2008" class="citation journal cs1">Zinovik, Igor; Kroening, Daniel; Chebiryak, Yury (2008-03-21). "Computing Binary Combinatorial Gray Codes Via Exhaustive Search With SAT Solvers". <i><a href="IEEE_Transactions_on_Information_Theory" title="IEEE Transactions on Information Theory">IEEE Transactions on Information Theory</a></i>. <b>54</b> (4). <a href="IEEE" class="mw-redirect" title="IEEE">IEEE</a>: <span class="nowrap">1819–</span>1823. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTIT.2008.917695">10.1109/TIT.2008.917695</a>. <a href="Hdl_(identifier)" class="mw-redirect" title="Hdl (identifier)">hdl</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://hdl.handle.net/20.500.11850%2F11304">20.500.11850/11304</a></span>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:2854180">2854180</a>.</cite> (5 pages)</li>
<li><cite id="CITEREFO'Brien1957" class="citation journal cs1">O'Brien, Joseph A. (June 1957). <a rel="nofollow" class="external text" href="https://www.researchgate.net/publication/250929745">"Unit-Distance Binary-Decimal Code Translators"</a>. <i><a href="IRE_Transactions_on_Electronic_Computers" class="mw-redirect" title="IRE Transactions on Electronic Computers">IRE Transactions on Electronic Computers</a></i>. <b>EC-6</b> (2): <span class="nowrap">122–</span>123. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FTEC.1957.5221585">10.1109/TEC.1957.5221585</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0367-9950">0367-9950</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-05-25</span></span>.</cite> (2 pages)</li>
<li><cite id="CITEREFBarr1981" class="citation magazine cs1">Barr, K. G. (March 1981). <a rel="nofollow" class="external text" href="https://worldradiohistory.com/hd2/IDX-Site-Early-Radio/Archive-Wireless-World-IDX/80s/Wireless-World-1981-03-OCR-Page-0046.pdf">"A decimal Gray code – Easily converted for shaft position coding"</a> <span class="cs1-format">(PDF)</span>. <i><a href="Wireless_World" class="mw-redirect" title="Wireless World">Wireless World</a></i>. Vol.&nbsp;87, no.&nbsp;1542. Faculty of Natural Sciences, <a href="University_of_the_West_Indies" title="University of the West Indies">University of the West Indies</a>. pp.&nbsp;<span class="nowrap">86–</span>87. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200728093447/https://worldradiohistory.com/hd2/IDX-Site-Early-Radio/Archive-Wireless-World-IDX/80s/Wireless-World-1981-03-OCR-Page-0046.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-07-28<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-07-28</span></span>.</cite></li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<div class="refbegin refbegin-columns references-column-width" style="column-width: 30em">
<ul><li><a rel="nofollow" class="external text" href="http://demonstrations.wolfram.com/BinaryGrayCode/">"Gray Code" demonstration</a> by Michael Schreiber, <a href="Wolfram_Demonstrations_Project" title="Wolfram Demonstrations Project">Wolfram Demonstrations Project</a> (with Mathematica implementation). 2007.</li>
<li><a rel="nofollow" class="external text" href="https://xlinux.nist.gov/dads/HTML/graycode.html">NIST Dictionary of Algorithms and Data Structures: Gray code</a>.</li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20151026021510/http://www.aip.de/~ast/EvolCompFAQ/Q21.htm">Hitch Hiker's Guide to Evolutionary Computation, Q21: What are Gray codes, and why are they used?</a>, including <a href="C_(programming_language)" title="C (programming language)">C</a> code to convert between binary and BRGC.</li>
<li>Dragos A. Harabor uses <a rel="nofollow" class="external text" href="https://web.archive.org/web/20151122120754/http://www.ugcs.caltech.edu/~dragos/3DP/coord.html">Gray codes in a 3D digitizer</a>.</li>
<li>Single-track gray codes, binary <a href="Chain_code" title="Chain code">chain codes</a> (<a rel="nofollow" class="external text" href="http://tinaja.com/text/chain01.html">Lancaster 1994</a>), and <a href="Linear-feedback_shift_register" title="Linear-feedback shift register">linear-feedback shift registers</a> are all useful in finding one's absolute position on a single-track rotary encoder (or other position sensor).</li>
<li><a rel="nofollow" class="external text" href="https://www.ams.org/featurecolumn/archive/gray.html">AMS Column: Gray codes</a></li>
<li><a rel="nofollow" class="external text" href="http://www.bushytails.net/~randyg/encoder/encoderwheel.html">Optical Encoder Wheel Generator</a></li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110724021700/http://prototalk.net/forums/showthread.php?t=78">ProtoTalk.net – Understanding Quadrature Encoding</a> – Covers quadrature encoding in more detail with a focus on robotic applications</li></ul>
</div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-06" href="https://en.wikipedia.org/wiki/?title=Gray_code&amp;oldid=1304434473">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>